Skip to content

Commit 3234b1e

Browse files
committed
ci-pipeline:add additional job for regtest staging
Add additional check for on-board and simic regtest staging. Add simic version query in comments to configure which simic version to use for the simic regression test. Signed-off-by: Adrian Ng Ho Yin <[email protected]>
1 parent 2bbe8e3 commit 3234b1e

File tree

1 file changed

+57
-4
lines changed

1 file changed

+57
-4
lines changed

.github/workflows/ci-pipeline.yml

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ jobs:
164164
ci-verification:
165165
runs-on: [ arc, lapwing, workspace_type=tmp-workspace, _site=png ]
166166
needs: ci-build
167+
outputs:
168+
parent_id: ${{ steps.extract.outputs.parent_id }}
169+
spect_url: ${{ steps.extract.outputs.spetc_link }}
167170
env:
168171
# Disable the warnings of Security violation. We need to check why this is trigger later, plaintext password.
169172
EC_DISABLE_VAL: project,system
@@ -188,12 +191,24 @@ jobs:
188191
git clone https://${{ secrets.GIT_USER }}:${{ secrets.GIT_TOKEN }}@github.com/altera-innersource/applications.devops.build-bot.github-pr-workflow
189192
cd applications.devops.build-bot.github-pr-workflow
190193
git checkout master
191-
bash workflow_Regtest.sh ${{ github.workspace }} ${{ github.event.repository.name }} ${{ github.event.pull_request.number }}
194+
bash workflow_Regtest.sh ${{ github.workspace }} ${{ github.event.repository.name }} ${{ github.event.pull_request.number }} ${{ secrets.GITHUB_TOKEN }} | tee $GITHUB_WORKSPACE/output.log
195+
- name: Extract Job id and spect url
196+
id: extract
197+
run: |
198+
PARENT_ID=$(grep -oP 'The ID of the top-level farm job is \K[0-9]+' $GITHUB_WORKSPACE/output.log)
199+
echo "Extracted Parent ID: $PARENT_ID"
200+
echo "parent_id=$PARENT_ID" >> $GITHUB_OUTPUT
201+
SPETC_LINK=$(grep -oP 'Link to SPeTC:\s*\K\S+' "$GITHUB_WORKSPACE/output.log")
202+
echo "Extracted SPeTC Link: $SPETC_LINK"
203+
echo "spetc_link=$SPETC_LINK" >> "$GITHUB_OUTPUT"
192204
193205
#This action runs the on-board regression test
194206
ci-on-board-verification:
195207
runs-on: [ arc, lapwing, workspace_type=tmp-workspace, _site=png ]
196208
needs: ci-build
209+
outputs:
210+
parent_id: ${{ steps.extract.outputs.parent_id }}
211+
spect_url: ${{ steps.extract.outputs.spetc_link }}
197212
env:
198213
# Disable the warnings of Security violation. We need to check why this is trigger later, plaintext password.
199214
EC_DISABLE_VAL: project,system
@@ -218,7 +233,45 @@ jobs:
218233
git clone https://${{ secrets.GIT_USER }}:${{ secrets.GIT_TOKEN }}@github.com/altera-innersource/applications.devops.build-bot.github-pr-workflow
219234
cd applications.devops.build-bot.github-pr-workflow
220235
git checkout master
221-
bash workflow_On_Board_Regtest.sh ${{ github.workspace }} ${{ github.event.repository.name }} ${{ github.event.pull_request.number }} ${{ secrets.GITHUB_TOKEN }}
236+
bash workflow_On_Board_Regtest.sh ${{ github.workspace }} ${{ github.event.repository.name }} ${{ github.event.pull_request.number }} ${{ secrets.GITHUB_TOKEN }} | tee $GITHUB_WORKSPACE/output.log
237+
238+
- name: Extract Job id and spect url
239+
id: extract
240+
run: |
241+
PARENT_ID=$(grep -oP 'The ID of the top-level farm job is \K[0-9]+' $GITHUB_WORKSPACE/output.log)
242+
echo "Extracted Parent ID: $PARENT_ID"
243+
echo "parent_id=$PARENT_ID" >> $GITHUB_OUTPUT
244+
SPETC_LINK=$(grep -oP 'Link to SPeTC:\s*\K\S+' "$GITHUB_WORKSPACE/output.log")
245+
echo "Extracted SPeTC Link: $SPETC_LINK"
246+
echo "spetc_link=$SPETC_LINK" >> "$GITHUB_OUTPUT"
247+
248+
#This actions checks the status of the on-board regression test
249+
ci-on-board-verification-status:
250+
runs-on: [ arc, lapwing, workspace_type=tmp-workspace, _site=png ]
251+
needs: ci-on-board-verification
252+
steps:
253+
- name: Extract regtest parent ID
254+
run: echo "Parent ID is ${{ needs.ci-on-board-verification.outputs.parent_id }}"
255+
- name: On-board Regtest Status
256+
run: |
257+
git clone https://${{ secrets.GIT_USER }}:${{ secrets.GIT_TOKEN }}@github.com/altera-innersource/applications.devops.build-bot.github-pr-workflow
258+
cd applications.devops.build-bot.github-pr-workflow
259+
git checkout master
260+
bash workflow_Regtest_status_check.sh ${{ github.workspace }} ${{ github.event.repository.name }} ${{ github.event.pull_request.number }} ${{ secrets.GITHUB_TOKEN }} ${{ needs.ci-on-board-verification.outputs.parent_id }} ${{ needs.ci-on-board-verification.outputs.spect_url }}
261+
262+
#This actions checks the status of the simic regression test
263+
ci-verification-status:
264+
runs-on: [ arc, lapwing, workspace_type=tmp-workspace, _site=png ]
265+
needs: ci-verification
266+
steps:
267+
- name: Extract regtest parent ID
268+
run: echo "Parent ID is ${{ needs.ci-on-board-verification.outputs.parent_id }}"
269+
- name: Simic Regtest Status
270+
run: |
271+
git clone https://${{ secrets.GIT_USER }}:${{ secrets.GIT_TOKEN }}@github.com/altera-innersource/applications.devops.build-bot.github-pr-workflow
272+
cd applications.devops.build-bot.github-pr-workflow
273+
git checkout master
274+
bash workflow_Regtest_status_check.sh ${{ github.workspace }} ${{ github.event.repository.name }} ${{ github.event.pull_request.number }} ${{ secrets.GITHUB_TOKEN }} ${{ needs.ci-verification.outputs.parent_id }} ${{ needs.ci-verification.outputs.spect_url }}
222275
223276
#This action checks if the branch has been released and if so block PR until approved by repo Admin
224277
ci-check-tag:
@@ -248,10 +301,10 @@ jobs:
248301
container:
249302
image: amr-registry.sc.altera.com/pse-pswe-software-ba/embedded_coverity:ubuntu20.04.0_6-new-proxy-inbuilt
250303
options: -v /mnt/nfs_share/site/proj/psg:/p/psg
251-
needs: [ci-coverity-parse-result, ci-verification, ci-checkpatch, ci-check-tag, ci-on-board-verification]
304+
needs: [ci-coverity-parse-result, ci-verification-status, ci-checkpatch, ci-check-tag, ci-on-board-verification-status]
252305
steps:
253306
- name: On failure
254-
if: ${{ needs.ci-coverity-parse-result.result != 'success' || needs.ci-verification.result != 'success' || needs.ci-checkpatch.result != 'success' || needs.ci-check-tag.result != 'success' || needs.ci-on-board-verification.result != 'success'}}
307+
if: ${{ needs.ci-coverity-parse-result.result != 'success' || needs.ci-verification-status.result != 'success' || needs.ci-checkpatch.result != 'success' || needs.ci-check-tag.result != 'success' || needs.ci-on-board-verification-status.result != 'success'}}
255308
run: |
256309
echo "Status check has failed."
257310
exit 1

0 commit comments

Comments
 (0)