From 9d7d2e25f780306a88f876dd50f4c73a6cab9d19 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Wed, 7 May 2025 14:33:41 -0400 Subject: [PATCH] ceph-pull-requests: Remove ghprb trigger This is the start of modifying all of the Jenkins jobs to not rely on ghprb Signed-off-by: David Galloway --- ceph-pull-requests/build/build | 12 +++--- ceph-pull-requests/build/kill-tests | 2 + .../config/definitions/ceph-pull-requests.yml | 38 +++++++++---------- 3 files changed, 25 insertions(+), 27 deletions(-) diff --git a/ceph-pull-requests/build/build b/ceph-pull-requests/build/build index 351b2b7f..fccf29eb 100644 --- a/ceph-pull-requests/build/build +++ b/ceph-pull-requests/build/build @@ -1,15 +1,15 @@ #!/bin/bash -ex -docs_pr_only -container_pr_only -if [[ "$DOCS_ONLY" = true || "$CONTAINER_ONLY" = true ]]; then - echo "Only the doc/ or container/ dir changed. No need to run make check." - exit 0 -fi +echo "This job was triggered by $TRIGGER_METHOD via $TRIGGERED_BY" + +report_github_check_status pending "make check" "make check running" $GH_PULL_REQUEST_SHA $BUILD_URL export NPROC=$(nproc) export WITH_CRIMSON=true export WITH_RBD_RWL=true timeout 3h ./run-make-check.sh + +report_github_check_status success "make check" "make check passed" $GH_PULL_REQUEST_SHA $BUILD_URL + sleep 5 ps -ef | grep -v jnlp | grep ceph || true diff --git a/ceph-pull-requests/build/kill-tests b/ceph-pull-requests/build/kill-tests index 8ecc1255..be4cd89d 100644 --- a/ceph-pull-requests/build/kill-tests +++ b/ceph-pull-requests/build/kill-tests @@ -1,5 +1,7 @@ #!/bin/bash -ex +report_github_check_status failure "make check" "make check failed" $GH_PULL_REQUEST_SHA $BUILD_URL + # kill all descendant processes of ctest # ceph-pull-requests/build/build is killed by jenkins when the ceph-pull-requests job is aborted or diff --git a/ceph-pull-requests/config/definitions/ceph-pull-requests.yml b/ceph-pull-requests/config/definitions/ceph-pull-requests.yml index 8cef990c..89b79004 100644 --- a/ceph-pull-requests/config/definitions/ceph-pull-requests.yml +++ b/ceph-pull-requests/config/definitions/ceph-pull-requests.yml @@ -26,32 +26,24 @@ parameters: - string: - name: ghprbPullId - description: "the GitHub pull id, like '72' in 'ceph/pull/72'" - - triggers: - - github-pull-request: - cancel-builds-on-update: true - allow-whitelist-orgs-as-admins: true - org-list: - - ceph - trigger-phrase: 'jenkins test make check' - skip-build-phrase: '^jenkins do not test.*' - only-trigger-phrase: false - github-hooks: true - permit-all: true - auto-close-on-fail: false - status-context: "make check" - started-status: "running make check" - success-status: "make check succeeded" - failure-status: "make check failed" + name: GH_PULL_REQUEST_ID + description: "The GitHub PR number, like '72' in 'ceph/pull/72'" + - string: + name: GH_PULL_REQUEST_SHA + description: "The GitHub PR SHA1, like 'c816207c3130c67e5bcc56766a530e881e2c0181'" + - string: + name: TRIGGERED_BY + description: "The GitHub Action Workflow that called this job" + - string: + name: TRIGGER_METHOD + description: "The method by which this job was triggered (e.g., comment or push)" scm: - git: url: https://github.com/ceph/ceph.git branches: - - origin/pr/${{ghprbPullId}}/merge - refspec: +refs/pull/${{ghprbPullId}}/*:refs/remotes/origin/pr/${{ghprbPullId}}/* + - origin/pr/${{GH_PULL_REQUEST_ID}}/merge + refspec: +refs/pull/${{GH_PULL_REQUEST_ID}}/*:refs/remotes/origin/pr/${{GH_PULL_REQUEST_ID}}/* browser: auto timeout: 20 skip-tag: true @@ -63,6 +55,7 @@ - shell: !include-raw-verbatim: - ../../../scripts/build_utils.sh + - ../../../scripts/report_github_check_status.sh - ../../build/build publishers: @@ -109,3 +102,6 @@ credential-id: github-readonly-token username: GITHUB_USER password: GITHUB_PASS + - text: + credential-id: github-ceph-jenkins-pr-checks + variable: GITHUB_TOKEN -- 2.39.5