ceph-csi/jobs/jjb-validate.yaml
Niels de Vos fef7bfdf23 ci: do not set a ghprbPullId parameter
The GitHub Pull Requests Builder plugin sets the ghprbPullId parameter.
There is no need to make it configurable, and it even overloads the
value from the plugin by the default value.

This cauesed the jjb-validate job to run against the ci/centos branch
for each PR, not against the contents of the PR itself.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-09-22 11:59:31 +02:00

42 lines
1.1 KiB
YAML

---
- job:
name: jjb-validate
project-type: pipeline
concurrent: true
properties:
- github:
url: https://github.com/ceph/ceph-csi
- build-discarder:
days-to-keep: 7
artifact-days-to-keep: 7
parameters:
dsl: |
def GIT_REPO = 'https://github.com/ceph/ceph-csi'
def GIT_BRANCH = 'ci/centos'
if (params.ghprbPullId != null) {
GIT_BRANCH = "pull/${ghprbPullId}/head"
}
node {
stage('checkout ci repository') {
checkout([$class: 'GitSCM', branches: [[name: 'FETCH_HEAD']],
userRemoteConfigs: [[url: "${GIT_REPO}",
refspec: "${GIT_BRANCH}"]]])
}
stage('validation') {
sh './deploy/jjb.sh validate'
}
}
triggers:
- github-pull-request:
status-context: ci/centos/jjb-validate
trigger-phrase: '/(re)?test ((all)|(ci/centos/jjb-validate))'
permit-all: true
github-hooks: true
white-list-target-branches:
- ci/centos
org-list:
- ceph
allow-whitelist-orgs-as-admins: true