* 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>
- 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"
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:
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:
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
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:
- 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