mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-26 00:00:23 +00:00
ci: replace inline dsl:
script by Groovy files
Jenkins Jobs Builder does not like the inline `dsl:` scripts anymore, so replace them by Groovy files in the main directory, similar to other jobs. Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
parent
6e38694a11
commit
9273955d92
16
jjb-deploy.groovy
Normal file
16
jjb-deploy.groovy
Normal file
@ -0,0 +1,16 @@
|
||||
node {
|
||||
stage('build-images') {
|
||||
parallel jjb: {
|
||||
sh "oc start-build --follow jjb"
|
||||
},
|
||||
mirror_images: {
|
||||
sh 'oc start-build --follow mirror-images'
|
||||
}
|
||||
}
|
||||
stage('checkout ci repository') {
|
||||
git url: "${GIT_REPO}", branch: "${GIT_BRANCH}", changelog: false
|
||||
}
|
||||
stage('deployment') {
|
||||
sh "./deploy/jjb.sh --cmd deploy --GIT_REF ${GIT_BRANCH} --GIT_REPO ${GIT_REPO}"
|
||||
}
|
||||
}
|
14
jjb-validate.groovy
Normal file
14
jjb-validate.groovy
Normal file
@ -0,0 +1,14 @@
|
||||
if (params.ghprbPullId != null) {
|
||||
GIT_BRANCH = "pull/${ghprbPullId}/merge"
|
||||
}
|
||||
|
||||
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 --cmd validate --GIT_REF ${GIT_BRANCH} --GIT_REPO ${GIT_REPO}"
|
||||
}
|
||||
}
|
@ -15,9 +15,9 @@
|
||||
git:
|
||||
url: https://github.com/ceph/ceph-csi
|
||||
branches:
|
||||
- ci/devel
|
||||
- ci/centos
|
||||
script-path: build-images.groovy
|
||||
lightweight-checkout: true
|
||||
lightweight-checkout: false
|
||||
scm:
|
||||
- git:
|
||||
name: origin
|
||||
|
@ -18,24 +18,14 @@
|
||||
- build-discarder:
|
||||
days-to-keep: 7
|
||||
artifact-days-to-keep: 7
|
||||
dsl: |
|
||||
node {
|
||||
stage('build-images') {
|
||||
parallel jjb: {
|
||||
sh "oc start-build --follow jjb"
|
||||
},
|
||||
mirror_images: {
|
||||
sh 'oc start-build --follow mirror-images'
|
||||
}
|
||||
}
|
||||
stage('checkout ci repository') {
|
||||
git url: "${GIT_REPO}", branch: "${GIT_BRANCH}", changelog: false
|
||||
}
|
||||
stage('deployment') {
|
||||
sh "./deploy/jjb.sh --cmd deploy \
|
||||
--GIT_REF ${GIT_BRANCH} --GIT_REPO ${GIT_REPO}"
|
||||
}
|
||||
}
|
||||
pipeline-scm:
|
||||
scm:
|
||||
git:
|
||||
url: https://github.com/ceph/ceph-csi
|
||||
branches:
|
||||
- ci/centos
|
||||
script-path: jjb-deploy.groovy
|
||||
lightweight-checkout: false
|
||||
scm:
|
||||
- git:
|
||||
name: origin
|
||||
|
@ -18,22 +18,14 @@
|
||||
- build-discarder:
|
||||
days-to-keep: 7
|
||||
artifact-days-to-keep: 7
|
||||
dsl: |
|
||||
if (params.ghprbPullId != null) {
|
||||
GIT_BRANCH = "pull/${ghprbPullId}/merge"
|
||||
}
|
||||
|
||||
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 --cmd validate \
|
||||
--GIT_REF ${GIT_BRANCH} --GIT_REPO ${GIT_REPO}"
|
||||
}
|
||||
}
|
||||
pipeline-scm:
|
||||
scm:
|
||||
git:
|
||||
url: https://github.com/ceph/ceph-csi
|
||||
branches:
|
||||
- ci/centos
|
||||
script-path: jjb-validate.groovy
|
||||
lightweight-checkout: false
|
||||
triggers:
|
||||
- github-pull-request:
|
||||
status-url: ${RUN_DISPLAY_URL}
|
||||
|
Loading…
Reference in New Issue
Block a user