]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-*-pull-requests*: use ghprbPullId to define branches 1426/head
authorKefu Chai <kchai@redhat.com>
Tue, 29 Oct 2019 01:32:15 +0000 (09:32 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 29 Oct 2019 03:34:03 +0000 (11:34 +0800)
* add "ghprbPullId" param, simpler to use than "sha1"
* instead of using "sha1", use "ghprbPullId" to define branches to build,
  more consistent this way. as we pull the refs using
  `+refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*`
  and after the change, the ref to build is specified using
  `origin/pr/${ghprbPullId}/merge`. also, by removing "sha1",
  we can specify a single parameter when rebuilding/building a branch
  on jenkins instead of two parameters.

Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph-perf-pull-requests/config/definitions/ceph-perf-pull-requests.yml
ceph-pull-requests-arm64/config/definitions/ceph-pull-requests-arm64.yml
ceph-pull-requests/config/definitions/ceph-pull-requests.yml

index c11dc51d07a8e8bcdc134310b0ea2231ebe32d0f..68408e0281f715d15da4458407e444f55f124f7d 100644 (file)
@@ -19,7 +19,7 @@
       - git:
           url: https://github.com/ceph/ceph.git
           branches:
-            - ${sha1}
+            - origin/pr/${ghprbPullId}/merge
           refspec: +refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*
           timeout: 20
           basedir: "ceph-pr"
@@ -93,8 +93,8 @@
 
     parameters:
       - string:
-          name: sha1
-          description: "commit id or a refname, like 'origin/pr/72/head'"
+          name: ghprbPullId
+          description: "the GitHub pull id, like '72' in 'ceph/pull/72'"
 
     triggers:
       - github-pull-request:
index 9b0f0b1b30654a80c46f44fd476bc4aa6ac34ad7..e61d26cd70db27fb7664fe3671ec38ee33cff84b 100644 (file)
@@ -12,8 +12,8 @@
     node: 'arm64 && !centos8'
     parameters:
     - string:
-        name: sha1
-        description: "commit id or a refname, like 'origin/pr/72/head'"
+        name: ghprbPullId
+        description: "the GitHub pull id, like '72' in 'ceph/pull/72'"
         default: origin/master
     project-type: freestyle
     properties:
@@ -43,7 +43,7 @@
         url: https://github.com/ceph/ceph.git
         name: origin
         branches:
-          - ${sha1}
+          - origin/pr/${ghprbPullId}/merge
         refspec: +refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*
         skip-tag: true
         shallow-clone: true
index 163800da5ff8cc44fbeee0daacb156258d9ee219..89963fc2d346e372d582a5e7f974fcb5992449d2 100644 (file)
@@ -22,8 +22,8 @@
 
     parameters:
       - string:
-          name: sha1
-          description: "commit id or a refname, like 'origin/pr/72/head'"
+          name: ghprbPullId
+          description: "the GitHub pull id, like '72' in 'ceph/pull/72'"
 
     triggers:
       - github-pull-request:
@@ -45,7 +45,7 @@
       - git:
           url: https://github.com/ceph/ceph.git
           branches:
-            - ${sha1}
+            - origin/pr/${ghprbPullId}/merge
           refspec: +refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*
           browser: auto
           timeout: 20