File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Sanity Test Jenkins Trigger
2+
3+ on :
4+ workflow_call :
5+ push :
6+ branches :
7+ - main
8+
9+ concurrency :
10+ group : main-${{ github.ref }}
11+ cancel-in-progress : false
12+
13+ jobs :
14+ sanity-tests :
15+ if : (github.event_name == 'pull_request' && github.event.action == 'ready_for_review') ||
16+ (github.event_name == 'pull_request_review' && github.event.review.state == 'approved')
17+ runs-on : tools-runner
18+
19+ steps :
20+ - name : Check for skip sanity test label
21+ id : check-skip-sanity-test
22+ env :
23+ GH_TOKEN : ${{ github.token }}
24+ run : |
25+ gh api -H "Accept: application/vnd.github+json" /repos/sysdiglabs/terraform-aws-secure/issues/${{ github.event.pull_request.number }}/labels | jq '[.[].name]' > /tmp/label_list
26+ if grep -q 'skip-sanity-test' /tmp/label_list; then
27+ echo "Skipping terraform-aws-secure-onboarding-tests job as skip-sanity-test label is present"
28+ echo "SKIP_SANITY_TEST=true" >> $GITHUB_OUTPUT
29+ else
30+ echo "SKIP_SANITY_TEST=false" >> $GITHUB_OUTPUT
31+ fi
32+
33+ - name : Trigger Onboarding job for this repo
34+ if : ${{ steps.check-skip-sanity-test.outputs.SKIP_SANITY_TEST == 'false'}}
35+ id : trigger-jenkins-job
36+ 37+ with :
38+ jenkins_url : ${{ secrets.JENKINS_INTERNAL_URL }}
39+ jenkins_user : ${{ secrets.JENKINS_QA_API_USER }}
40+ jenkins_token : ${{ secrets.JENKINS_QA_API_TOKEN }}
41+ job_name : " qa/QA-secure/onboarding/terraform-aws-secure-onboarding-tests/"
42+ job_params : |
43+ {
44+ "MODULE_BRANCH": "${{ github.head_ref }}"
45+ }
46+ job_timeout : " 5400"
You can’t perform that action at this time.
0 commit comments