mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-27 00:30:18 +00:00
5830a2f1bf
By using GitHub Hooks, jobs get triggers quickers. It also may prevent the occasional hickup in the Jenkins GitHub-Pull-Request-Builder while polling events for the cron-jobs. Signed-off-by: Niels de Vos <ndevos@redhat.com>
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
---
|
|
- job:
|
|
name: jjb-validate
|
|
project-type: pipeline
|
|
sandbox: true
|
|
concurrent: true
|
|
properties:
|
|
- github:
|
|
url: https://github.com/ceph/ceph-csi
|
|
- build-discarder:
|
|
days-to-keep: 7
|
|
artifact-days-to-keep: 7
|
|
parameters:
|
|
- string:
|
|
name: ghprbPullId
|
|
description: GitHub Pull-Request ID for testing
|
|
default: 0
|
|
dsl: |
|
|
def GIT_REPO = 'https://github.com/ceph/ceph-csi'
|
|
def GIT_BRANCH = 'ci/centos'
|
|
|
|
if (params.ghprbPullId != null && "${ghprbPullId}" != "0") {
|
|
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
|