mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +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:
|
git:
|
||||||
url: https://github.com/ceph/ceph-csi
|
url: https://github.com/ceph/ceph-csi
|
||||||
branches:
|
branches:
|
||||||
- ci/devel
|
- ci/centos
|
||||||
script-path: build-images.groovy
|
script-path: build-images.groovy
|
||||||
lightweight-checkout: true
|
lightweight-checkout: false
|
||||||
scm:
|
scm:
|
||||||
- git:
|
- git:
|
||||||
name: origin
|
name: origin
|
||||||
|
@ -18,24 +18,14 @@
|
|||||||
- build-discarder:
|
- build-discarder:
|
||||||
days-to-keep: 7
|
days-to-keep: 7
|
||||||
artifact-days-to-keep: 7
|
artifact-days-to-keep: 7
|
||||||
dsl: |
|
pipeline-scm:
|
||||||
node {
|
scm:
|
||||||
stage('build-images') {
|
git:
|
||||||
parallel jjb: {
|
url: https://github.com/ceph/ceph-csi
|
||||||
sh "oc start-build --follow jjb"
|
branches:
|
||||||
},
|
- ci/centos
|
||||||
mirror_images: {
|
script-path: jjb-deploy.groovy
|
||||||
sh 'oc start-build --follow mirror-images'
|
lightweight-checkout: false
|
||||||
}
|
|
||||||
}
|
|
||||||
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}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
scm:
|
scm:
|
||||||
- git:
|
- git:
|
||||||
name: origin
|
name: origin
|
||||||
|
@ -18,22 +18,14 @@
|
|||||||
- build-discarder:
|
- build-discarder:
|
||||||
days-to-keep: 7
|
days-to-keep: 7
|
||||||
artifact-days-to-keep: 7
|
artifact-days-to-keep: 7
|
||||||
dsl: |
|
pipeline-scm:
|
||||||
if (params.ghprbPullId != null) {
|
scm:
|
||||||
GIT_BRANCH = "pull/${ghprbPullId}/merge"
|
git:
|
||||||
}
|
url: https://github.com/ceph/ceph-csi
|
||||||
|
branches:
|
||||||
node {
|
- ci/centos
|
||||||
stage('checkout ci repository') {
|
script-path: jjb-validate.groovy
|
||||||
checkout([$class: 'GitSCM', branches: [[name: 'FETCH_HEAD']],
|
lightweight-checkout: false
|
||||||
userRemoteConfigs: [[url: "${GIT_REPO}",
|
|
||||||
refspec: "${GIT_BRANCH}"]]])
|
|
||||||
}
|
|
||||||
stage('validation') {
|
|
||||||
sh "./deploy/jjb.sh --cmd validate \
|
|
||||||
--GIT_REF ${GIT_BRANCH} --GIT_REPO ${GIT_REPO}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
triggers:
|
triggers:
|
||||||
- github-pull-request:
|
- github-pull-request:
|
||||||
status-url: ${RUN_DISPLAY_URL}
|
status-url: ${RUN_DISPLAY_URL}
|
||||||
|
Loading…
Reference in New Issue
Block a user