From bb4b792a5dfcc0b6bee38a5a17a576f73bc8862a Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 7 Sep 2019 14:53:26 +0800 Subject: [PATCH] ceph-*/config/definition: only pull the PR under test see https://github.com/jenkinsci/ghprb-plugin/blob/master/README.md#creating-a-job no need to pull all PR references of the remote repo. it'd be faster just pull the references of a single PR. actually, what we need is but - refs/pull/${pr}/head - refs/pull/${pr}/merge Signed-off-by: Kefu Chai --- .../config/definitions/ceph-build-pull-requests.yml | 4 ++-- .../config/definitions/ceph-dashboard-pr-backend.yml | 4 ++-- .../config/definitions/ceph-dashboard-pull-requests.yml | 4 ++-- .../config/definitions/ceph-perf-pull-requests.yml | 3 --- ceph-pr-commits/config/definitions/ceph-pr-commits.yml | 4 ++-- ceph-pr-docs/config/definitions/ceph-pr-docs.yml | 2 +- .../config/definitions/ceph-pr-render-docs.yml | 2 +- ceph-pr-submodules/config/definitions/ceph-pr-commits.yml | 4 ++-- .../config/definitions/ceph-pull-requests-arm64.yml | 6 +++--- .../config/definitions/ceph-pull-requests.yml | 4 ++-- 10 files changed, 17 insertions(+), 20 deletions(-) diff --git a/ceph-build-pull-requests/config/definitions/ceph-build-pull-requests.yml b/ceph-build-pull-requests/config/definitions/ceph-build-pull-requests.yml index e4c6a1a7..48daaf52 100644 --- a/ceph-build-pull-requests/config/definitions/ceph-build-pull-requests.yml +++ b/ceph-build-pull-requests/config/definitions/ceph-build-pull-requests.yml @@ -21,7 +21,7 @@ parameters: - string: name: sha1 - description: "A pull request ID, like 'origin/pr/72/head'" + description: "commit id or a refname, like 'origin/pr/72/head'" triggers: - github-pull-request: @@ -42,7 +42,7 @@ url: https://github.com/ceph/ceph-build.git branches: - ${sha1} - refspec: +refs/pull/*:refs/remotes/origin/pr/* + refspec: +refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/* browser: auto timeout: 20 skip-tag: true diff --git a/ceph-dashboard-pr-backend/config/definitions/ceph-dashboard-pr-backend.yml b/ceph-dashboard-pr-backend/config/definitions/ceph-dashboard-pr-backend.yml index 24b0b51c..2da15cc1 100644 --- a/ceph-dashboard-pr-backend/config/definitions/ceph-dashboard-pr-backend.yml +++ b/ceph-dashboard-pr-backend/config/definitions/ceph-dashboard-pr-backend.yml @@ -23,7 +23,7 @@ parameters: - string: name: sha1 - description: "A pull request ID, like 'origin/pr/72/head'" + description: "commit id or a refname, like 'origin/pr/72/head'" triggers: - github-pull-request: @@ -49,7 +49,7 @@ url: https://github.com/ceph/ceph.git branches: - ${sha1} - refspec: +refs/pull/*:refs/remotes/origin/pr/* + refspec: +refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/* browser: auto timeout: 20 skip-tag: true diff --git a/ceph-dashboard-pull-requests/config/definitions/ceph-dashboard-pull-requests.yml b/ceph-dashboard-pull-requests/config/definitions/ceph-dashboard-pull-requests.yml index 64a25164..73a93b6e 100644 --- a/ceph-dashboard-pull-requests/config/definitions/ceph-dashboard-pull-requests.yml +++ b/ceph-dashboard-pull-requests/config/definitions/ceph-dashboard-pull-requests.yml @@ -23,7 +23,7 @@ parameters: - string: name: sha1 - description: "A pull request ID, like 'origin/pr/72/head'" + description: "commit id or a refname, like 'origin/pr/72/head'" triggers: - github-pull-request: @@ -50,7 +50,7 @@ url: https://github.com/ceph/ceph.git branches: - ${sha1} - refspec: +refs/pull/*:refs/remotes/origin/pr/* + refspec: +refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/* browser: auto timeout: 20 skip-tag: true diff --git a/ceph-perf-pull-requests/config/definitions/ceph-perf-pull-requests.yml b/ceph-perf-pull-requests/config/definitions/ceph-perf-pull-requests.yml index bf929db0..46b9bc2c 100644 --- a/ceph-perf-pull-requests/config/definitions/ceph-perf-pull-requests.yml +++ b/ceph-perf-pull-requests/config/definitions/ceph-perf-pull-requests.yml @@ -95,9 +95,6 @@ - string: name: sha1 description: "commit id or a refname, like 'origin/pr/72/head'" - - string: - name: ghprbPullId - description: "A pull request ID, like '72' in https://github.com/ceph/ceph/pull/72" triggers: - github-pull-request: diff --git a/ceph-pr-commits/config/definitions/ceph-pr-commits.yml b/ceph-pr-commits/config/definitions/ceph-pr-commits.yml index e2892b63..c96137bb 100644 --- a/ceph-pr-commits/config/definitions/ceph-pr-commits.yml +++ b/ceph-pr-commits/config/definitions/ceph-pr-commits.yml @@ -5,7 +5,7 @@ url: https://github.com/ceph/ceph.git branches: - ${sha1} - refspec: +refs/pull/*:refs/remotes/origin/pr/* + refspec: +refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/* browser: auto timeout: 20 skip-tag: true @@ -47,7 +47,7 @@ parameters: - string: name: sha1 - description: "A pull request ID, like 'origin/pr/72/head'" + description: "commit id or a refname, like 'origin/pr/72/head'" triggers: - github-pull-request: diff --git a/ceph-pr-docs/config/definitions/ceph-pr-docs.yml b/ceph-pr-docs/config/definitions/ceph-pr-docs.yml index d0a08300..1cf300a3 100644 --- a/ceph-pr-docs/config/definitions/ceph-pr-docs.yml +++ b/ceph-pr-docs/config/definitions/ceph-pr-docs.yml @@ -38,7 +38,7 @@ browser: auto branches: - ${sha1} - refspec: +refs/pull/*:refs/remotes/origin/pr/* + refspec: +refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/* skip-tag: true timeout: 20 wipe-workspace: true diff --git a/ceph-pr-render-docs/config/definitions/ceph-pr-render-docs.yml b/ceph-pr-render-docs/config/definitions/ceph-pr-render-docs.yml index ea9af526..a857fff3 100644 --- a/ceph-pr-render-docs/config/definitions/ceph-pr-render-docs.yml +++ b/ceph-pr-render-docs/config/definitions/ceph-pr-render-docs.yml @@ -38,7 +38,7 @@ browser: auto branches: - ${sha1} - refspec: +refs/pull/*:refs/remotes/origin/pr/* + refspec: +refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/* skip-tag: true timeout: 20 wipe-workspace: true diff --git a/ceph-pr-submodules/config/definitions/ceph-pr-commits.yml b/ceph-pr-submodules/config/definitions/ceph-pr-commits.yml index 3c98a19a..7769ad74 100644 --- a/ceph-pr-submodules/config/definitions/ceph-pr-commits.yml +++ b/ceph-pr-submodules/config/definitions/ceph-pr-commits.yml @@ -20,7 +20,7 @@ parameters: - string: name: sha1 - description: "A pull request ID, like 'origin/pr/72/head'" + description: "commit id or a refname, like 'origin/pr/72/head'" triggers: - github-pull-request: @@ -42,7 +42,7 @@ url: https://github.com/ceph/ceph.git branches: - ${sha1} - refspec: +refs/pull/*:refs/remotes/origin/pr/* + refspec: +refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/* browser: auto timeout: 20 skip-tag: true diff --git a/ceph-pull-requests-arm64/config/definitions/ceph-pull-requests-arm64.yml b/ceph-pull-requests-arm64/config/definitions/ceph-pull-requests-arm64.yml index 6adcab91..5bdc71e4 100644 --- a/ceph-pull-requests-arm64/config/definitions/ceph-pull-requests-arm64.yml +++ b/ceph-pull-requests-arm64/config/definitions/ceph-pull-requests-arm64.yml @@ -12,9 +12,9 @@ node: arm64 parameters: - string: - default: origin/master - description: A pull request ID, like 'origin/pr/72/head' name: sha1 + description: "commit id or a refname, like 'origin/pr/72/head'" + default: origin/master project-type: freestyle properties: - build-discarder: @@ -46,7 +46,7 @@ origin - +refs/pull/*:refs/remotes/origin/pr/* + +refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/* https://github.com/ceph/ceph.git diff --git a/ceph-pull-requests/config/definitions/ceph-pull-requests.yml b/ceph-pull-requests/config/definitions/ceph-pull-requests.yml index 333b1af0..0fbc7d77 100644 --- a/ceph-pull-requests/config/definitions/ceph-pull-requests.yml +++ b/ceph-pull-requests/config/definitions/ceph-pull-requests.yml @@ -23,7 +23,7 @@ parameters: - string: name: sha1 - description: "A pull request ID, like 'origin/pr/72/head'" + description: "commit id or a refname, like 'origin/pr/72/head'" triggers: - github-pull-request: @@ -46,7 +46,7 @@ url: https://github.com/ceph/ceph.git branches: - ${sha1} - refspec: +refs/pull/*:refs/remotes/origin/pr/* + refspec: +refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/* browser: auto timeout: 20 skip-tag: true -- 2.39.5