Skip to content

Commit 2652363

Browse files
committed
ceph-pr-api: Remove ghprb
Merge with ceph/ceph#63168 Signed-off-by: David Galloway <david.galloway@ibm.com>
1 parent a37ca41 commit 2652363

2 files changed

Lines changed: 30 additions & 35 deletions

File tree

ceph-pr-api/build/build

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
#!/bin/bash -e
22

3-
docs_pr_only
4-
container_pr_only
5-
if [[ "$DOCS_ONLY" = true || "$CONTAINER_ONLY" = true ]]; then
6-
echo "Only the doc/ or container/ dir changed. No need to run make check or API tests."
7-
mkdir -p $WORKSPACE/build/out
8-
echo "File created to avoid Jenkins' Artifact Archiving plugin from hanging" > $WORKSPACE/build/out/mgr.foo.log
9-
exit 0
10-
fi
3+
echo "This job was triggered by $TRIGGER_METHOD via $TRIGGERED_BY"
4+
5+
report_github_check_status pending "ceph API tests" "ceph API tests running" $GH_PULL_REQUEST_SHA $BUILD_URL
116

127
n_build_jobs=$(get_nr_build_jobs)
138
n_test_jobs=$(($(nproc) / 4))
@@ -16,5 +11,8 @@ export BUILD_MAKEOPTS="-j${n_build_jobs}"
1611
export FOR_MAKE_CHECK=1
1712
timeout 2h ./src/script/run-make.sh \
1813
--cmake-args '-DWITH_TESTS=OFF -DENABLE_GIT_VERSION=OFF'
14+
15+
report_github_check_status success "ceph API tests" "ceph API tests passed" $GH_PULL_REQUEST_SHA $BUILD_URL
16+
1917
sleep 5
2018
ps -ef | grep ceph || true

ceph-pr-api/config/definitions/ceph-pr-api.yml

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,38 +25,24 @@
2525
2626
parameters:
2727
- 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)"
5339

5440
scm:
5541
- git:
5642
url: https://github.com/ceph/ceph.git
5743
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}}/*
6046
browser: auto
6147
timeout: 20
6248
skip-tag: true
@@ -77,6 +63,14 @@
7763
publishers:
7864
- postbuildscript:
7965
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}}
8074
- role: SLAVE
8175
build-on:
8276
- ABORTED
@@ -95,3 +89,6 @@
9589
credential-id: github-readonly-token
9690
username: GITHUB_USER
9791
password: GITHUB_PASS
92+
- text:
93+
credential-id: github-ceph-jenkins-pr-checks
94+
variable: GITHUB_TOKEN

0 commit comments

Comments
 (0)