mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 22:30:23 +00:00
ci: move inline script into separate build-images.groovy file
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
parent
31cddd1f36
commit
ad0a645324
20
build-images.groovy
Normal file
20
build-images.groovy
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
def GIT_REPO = 'http://github.com/ceph/ceph-csi'
|
||||||
|
def GIT_BRANCH = 'devel'
|
||||||
|
node {
|
||||||
|
stage('checkout repository') {
|
||||||
|
git url: "${GIT_REPO}", branch: "${GIT_BRANCH}", changelog: false
|
||||||
|
}
|
||||||
|
stage('build images') {
|
||||||
|
def base_image = sh(script: 'source ${WORKSPACE}/build.env && echo ${BASE_IMAGE}',
|
||||||
|
returnStdout: true).trim()
|
||||||
|
parallel canary: {
|
||||||
|
sh "oc start-build --follow --build-arg=BASE_IMAGE='${base_image}' --build-arg=GO_ARCH=amd64 ceph-csi-canary"
|
||||||
|
},
|
||||||
|
test: {
|
||||||
|
sh 'oc start-build --follow --build-arg=GOARCH=amd64 ceph-csi-test'
|
||||||
|
},
|
||||||
|
devel: {
|
||||||
|
sh "oc start-build --follow --build-arg=BASE_IMAGE='${base_image}' --build-arg=GOARCH=amd64 ceph-csi-devel"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -10,37 +10,14 @@
|
|||||||
- build-discarder:
|
- build-discarder:
|
||||||
days-to-keep: 7
|
days-to-keep: 7
|
||||||
artifact-days-to-keep: 7
|
artifact-days-to-keep: 7
|
||||||
# yamllint disable rule:line-length
|
pipeline-scm:
|
||||||
dsl: |
|
scm:
|
||||||
def GIT_REPO = 'http://github.com/ceph/ceph-csi'
|
git:
|
||||||
def GIT_BRANCH = 'devel'
|
url: https://github.com/ceph/ceph-csi
|
||||||
node {
|
branches:
|
||||||
stage('checkout repository') {
|
- ci/devel
|
||||||
git url: "${GIT_REPO}", branch: "${GIT_BRANCH}", changelog: false
|
script-path: build-images.groovy
|
||||||
}
|
lightweight-checkout: true
|
||||||
stage('build images') {
|
|
||||||
def base_image = sh(script: 'source ${WORKSPACE}/build.env && echo ${BASE_IMAGE}',
|
|
||||||
returnStdout: true).trim()
|
|
||||||
parallel canary: {
|
|
||||||
sh "oc start-build --follow \
|
|
||||||
--build-arg=BASE_IMAGE='${base_image}' \
|
|
||||||
--build-arg=GO_ARCH=amd64 \
|
|
||||||
ceph-csi-canary"
|
|
||||||
},
|
|
||||||
test: {
|
|
||||||
sh 'oc start-build --follow \
|
|
||||||
--build-arg=GOARCH=amd64 \
|
|
||||||
ceph-csi-test'
|
|
||||||
},
|
|
||||||
devel: {
|
|
||||||
sh "oc start-build --follow \
|
|
||||||
--build-arg=BASE_IMAGE='${base_image}' \
|
|
||||||
--build-arg=GOARCH=amd64 \
|
|
||||||
ceph-csi-devel"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
# yamllint enable rule:line-length
|
|
||||||
scm:
|
scm:
|
||||||
- git:
|
- git:
|
||||||
name: origin
|
name: origin
|
||||||
|
Loading…
Reference in New Issue
Block a user