ci: pass ghprbPullId as parameter to jjb-validate job

Currently the jjb-validate job always checks out the ci/centos branch,
not the contents of the PR. This makes testing PRs unreliable.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-08-03 16:32:37 +02:00
parent 1fb77b0626
commit 322698a313

View File

@ -10,11 +10,16 @@
- build-discarder: - build-discarder:
days-to-keep: 7 days-to-keep: 7
artifact-days-to-keep: 7 artifact-days-to-keep: 7
parameters:
- string:
name: ghprbPullId
description: GitHub Pull-Request ID for testing
default: 0
dsl: | dsl: |
def GIT_REPO = 'https://github.com/ceph/ceph-csi' def GIT_REPO = 'https://github.com/ceph/ceph-csi'
def GIT_BRANCH = 'ci/centos' def GIT_BRANCH = 'ci/centos'
if (params.ghprbPullId != null) { if (params.ghprbPullId != null && "${ghprbPullId}" != "0") {
GIT_BRANCH = "pull/${ghprbPullId}/head" GIT_BRANCH = "pull/${ghprbPullId}/head"
} }