mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 06:10:22 +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:
|
||||
days-to-keep: 7
|
||||
artifact-days-to-keep: 7
|
||||
# yamllint disable rule:line-length
|
||||
dsl: |
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
# yamllint enable rule:line-length
|
||||
pipeline-scm:
|
||||
scm:
|
||||
git:
|
||||
url: https://github.com/ceph/ceph-csi
|
||||
branches:
|
||||
- ci/devel
|
||||
script-path: build-images.groovy
|
||||
lightweight-checkout: true
|
||||
scm:
|
||||
- git:
|
||||
name: origin
|
||||
|
Loading…
Reference in New Issue
Block a user