mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +00:00
ci: pass BASE_IMAGE to "oc start-build"
Because the parallel steps, the build.env is not in the local directory where the command is executed. So fetch the BASE_IMAGE before continuing with 'oc start-build', and pass the name of the image on the commandline. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
c281511a11
commit
9c4009bd14
@ -19,14 +19,21 @@
|
|||||||
git url: "${GIT_REPO}", branch: "${GIT_BRANCH}", changelog: false
|
git url: "${GIT_REPO}", branch: "${GIT_BRANCH}", changelog: false
|
||||||
}
|
}
|
||||||
stage('build images') {
|
stage('build images') {
|
||||||
|
def base_image = sh(script: 'source ${WORKSPACE}/build.env && echo ${BASE_IMAGE}',
|
||||||
|
returnStdout: true).trim()
|
||||||
parallel canary: {
|
parallel canary: {
|
||||||
sh 'source build.env && oc start-build --follow --build-arg=BASE_IMAGE="${BASE_IMAGE}" --build-arg=GO_ARCH=amd64 ceph-csi-canary'
|
sh "oc start-build --follow \
|
||||||
|
--build-arg=BASE_IMAGE='${base_image}' \
|
||||||
|
--build-arg=GO_ARCH=amd64 \
|
||||||
|
ceph-csi-canary"
|
||||||
},
|
},
|
||||||
test: {
|
test: {
|
||||||
sh 'oc start-build --follow ceph-csi-test'
|
sh 'oc start-build --follow ceph-csi-test'
|
||||||
},
|
},
|
||||||
devel: {
|
devel: {
|
||||||
sh 'source build.env && oc start-build --follow --build-arg=BASE_IMAGE="${BASE_IMAGE}" ceph-csi-devel'
|
sh "oc start-build --follow \
|
||||||
|
--build-arg=BASE_IMAGE='${base_image}' \
|
||||||
|
ceph-csi-devel"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user