|
25 | 25 |
|
26 | 26 | parameters: |
27 | 27 | - string: |
28 | | - name: sha1 |
29 | | - description: "commit id or a refname, like 'origin/pr/72/head'" |
30 | | - |
31 | | - triggers: |
32 | | - - github-pull-request: |
33 | | - cancel-builds-on-update: true |
34 | | - allow-whitelist-orgs-as-admins: true |
35 | | - org-list: |
36 | | - - ceph |
37 | | - white-list-target-branches: |
38 | | - - main |
39 | | - - tentacle |
40 | | - - squid |
41 | | - - reef |
42 | | - - "feature-.*" |
43 | | - trigger-phrase: 'jenkins test api' |
44 | | - skip-build-phrase: '^jenkins do not test.*' |
45 | | - only-trigger-phrase: false |
46 | | - github-hooks: true |
47 | | - permit-all: true |
48 | | - auto-close-on-fail: false |
49 | | - status-context: "ceph API tests" |
50 | | - started-status: "running API tests" |
51 | | - success-status: "ceph API tests succeeded" |
52 | | - failure-status: "ceph API tests failed" |
| 28 | + name: GH_PULL_REQUEST_ID |
| 29 | + description: "The GitHub PR number, like '72' in 'ceph/pull/72'" |
| 30 | + - string: |
| 31 | + name: GH_PULL_REQUEST_SHA |
| 32 | + description: "The GitHub PR SHA1, like 'c816207c3130c67e5bcc56766a530e881e2c0181'" |
| 33 | + - string: |
| 34 | + name: TRIGGERED_BY |
| 35 | + description: "The GitHub Action Workflow that called this job" |
| 36 | + - string: |
| 37 | + name: TRIGGER_METHOD |
| 38 | + description: "The method by which this job was triggered (e.g., comment or push)" |
53 | 39 |
|
54 | 40 | scm: |
55 | 41 | - git: |
56 | 42 | url: https://github.com/ceph/ceph.git |
57 | 43 | branches: |
58 | | - - origin/pr/${{ghprbPullId}}/merge |
59 | | - refspec: +refs/pull/${{ghprbPullId}}/*:refs/remotes/origin/pr/${{ghprbPullId}}/* |
| 44 | + - origin/pr/${{GH_PULL_REQUEST_ID}}/merge |
| 45 | + refspec: +refs/pull/${{GH_PULL_REQUEST_ID}}/*:refs/remotes/origin/pr/${{GH_PULL_REQUEST_ID}}/* |
60 | 46 | browser: auto |
61 | 47 | timeout: 20 |
62 | 48 | skip-tag: true |
|
77 | 63 | publishers: |
78 | 64 | - postbuildscript: |
79 | 65 | builders: |
| 66 | + - role: SLAVE |
| 67 | + build-on: |
| 68 | + - FAILURE |
| 69 | + - ABORTED |
| 70 | + build-steps: |
| 71 | + - shell: | |
| 72 | + . ../../../scripts/report_github_check_status.sh |
| 73 | + report_github_check_status failure "ceph API tests" "ceph API tests failed" ${{GH_PULL_REQUEST_SHA}} ${{BUILD_URL}} |
80 | 74 | - role: SLAVE |
81 | 75 | build-on: |
82 | 76 | - ABORTED |
|
95 | 89 | credential-id: github-readonly-token |
96 | 90 | username: GITHUB_USER |
97 | 91 | password: GITHUB_PASS |
| 92 | + - text: |
| 93 | + credential-id: github-ceph-jenkins-pr-checks |
| 94 | + variable: GITHUB_TOKEN |
0 commit comments