]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-*/config/definition: only pull the PR under test
authorKefu Chai <kchai@redhat.com>
Sat, 7 Sep 2019 06:53:26 +0000 (14:53 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 4 Oct 2019 16:52:13 +0000 (00:52 +0800)
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 <kchai@redhat.com>
ceph-build-pull-requests/config/definitions/ceph-build-pull-requests.yml
ceph-dashboard-pr-backend/config/definitions/ceph-dashboard-pr-backend.yml
ceph-dashboard-pull-requests/config/definitions/ceph-dashboard-pull-requests.yml
ceph-perf-pull-requests/config/definitions/ceph-perf-pull-requests.yml
ceph-pr-commits/config/definitions/ceph-pr-commits.yml
ceph-pr-docs/config/definitions/ceph-pr-docs.yml
ceph-pr-render-docs/config/definitions/ceph-pr-render-docs.yml
ceph-pr-submodules/config/definitions/ceph-pr-commits.yml
ceph-pull-requests-arm64/config/definitions/ceph-pull-requests-arm64.yml
ceph-pull-requests/config/definitions/ceph-pull-requests.yml

index e4c6a1a79e5b77ac59720a8382a4e2e81a594793..48daaf524187d9e1906acdabfe55a20b23d32640 100644 (file)
@@ -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
index 24b0b51ca8ebbb2052bcc3ca0af392f3a61fe009..2da15cc139301b37972f8402603552a81cd77d92 100644 (file)
@@ -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
index 64a2516451d7df28910639f1842b9beb2a5e1d6c..73a93b6e335e925b60b638bcf9f53fa58b2e57bc 100644 (file)
@@ -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
index bf929db01aaec4554bd5792da2c9edb6a04d1825..46b9bc2cd31bd73df68a18f1035edc19c88d9f46 100644 (file)
@@ -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:
index e2892b631733f97e63a12ad4f4c362d25c762339..c96137bb7fb6949f93189ccde759b56ea31d9608 100644 (file)
@@ -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:
index d0a08300fae1c1d25091e5eed220a31a3d79f4a8..1cf300a3c176dc4f149fce23cd19019fbbc13e04 100644 (file)
@@ -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
index ea9af526fa1e9499a6e4e28596b273fe42b9d3d1..a857fff3068a689102233d70b6571b996c57798d 100644 (file)
@@ -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
index 3c98a19a4a3bc3f487ecfb452b10e552282907af..7769ad74a1256cade80362393cd4c09b782413b6 100644 (file)
@@ -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
index 6adcab919ff65ba8353daeead828a1dc459c193d..5bdc71e47a2301545d35afeeb0153689ed229836 100644 (file)
@@ -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 @@
           <userRemoteConfigs>
           <hudson.plugins.git.UserRemoteConfig>
           <name>origin</name>
-          <refspec>+refs/pull/*:refs/remotes/origin/pr/*</refspec>
+          <refspec>+refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*</refspec>
           <url>https://github.com/ceph/ceph.git</url>
           </hudson.plugins.git.UserRemoteConfig>
           </userRemoteConfigs>
index 333b1af0f9274b106e6ccaecaa33ec2ab530ef19..0fbc7d77b66d98d31f6164ce2c2c66dca23b792f 100644 (file)
@@ -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