File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1616# A workflow to trigger ci on hybrid infra (github + self hosted runner)
1717name : L0-Test
1818on :
19+ issue_comment :
20+ types : [created]
1921 workflow_dispatch :
2022 inputs :
2123 sha :
3133 description : ' test results page url'
3234 required : false
3335jobs :
36+ Job-trigger :
37+ name : Start ci job
38+ if : startsWith( github.event.comment.body, '/bot' )
39+ runs-on : [self-hosted, Linux, Jenkins]
40+ steps :
41+ - name : Start ci job
42+ env :
43+ githubData : ${{ toJSON(github.event) }}
44+ run : |
45+ CI_SERVER="${{ secrets.CI_SERVER }}"
46+ JENKINS_URL=$(echo "$CI_SERVER" | cut -d '@' -f 1)
47+ TOKEN=$(echo "$CI_SERVER" | cut -d '@' -f 2)
48+ printf '%s' "$githubData" > githubData.json
49+ curl -s -X POST --fail-with-body \
50+ -H "Content-Type: application/json" \
51+ -d @githubData.json \
52+ "$JENKINS_URL/generic-webhook-trigger/invoke?token=$TOKEN"
3453 Upload-Test :
3554 name : Upload test results
3655 runs-on : linux-amd64-cpu4
You can’t perform that action at this time.
0 commit comments