mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 06:31:18 +02:00
Merge pull request #122 from kinvolk/kai/vm-matrix-reuse
jenkins/vm: expect a FORMATS parameter which has a list of formats
This commit is contained in:
commit
dd4a8e0335
@ -43,16 +43,21 @@ img=src/flatcar_production_image.bin
|
|||||||
[[ "${img}.bz2" -nt "${img}" ]] &&
|
[[ "${img}.bz2" -nt "${img}" ]] &&
|
||||||
enter lbunzip2 -k -f "/mnt/host/source/${img}.bz2"
|
enter lbunzip2 -k -f "/mnt/host/source/${img}.bz2"
|
||||||
|
|
||||||
# If the format variable ends with _pro it's a Flatcar Pro image and it should
|
if [[ "${FORMATS}" = "" ]]
|
||||||
# be uploaded to the private bucket.
|
|
||||||
PRIVATE_UPLOAD_OPT=""
|
|
||||||
if [[ -z "${FORMAT##*_pro}" ]]
|
|
||||||
then
|
then
|
||||||
PRIVATE_UPLOAD_OPT="--private"
|
FORMATS="${FORMAT}"
|
||||||
UPLOAD_ROOT=${UPLOAD_PRIVATE_ROOT}
|
|
||||||
fi
|
fi
|
||||||
|
for FORMAT in ${FORMATS}; do
|
||||||
|
# If the format variable ends with _pro it's a Flatcar Pro image and it should
|
||||||
|
# be uploaded to the private bucket.
|
||||||
|
PRIVATE_UPLOAD_OPT=""
|
||||||
|
if [[ -z "${FORMAT##*_pro}" ]]
|
||||||
|
then
|
||||||
|
PRIVATE_UPLOAD_OPT="--private"
|
||||||
|
UPLOAD_ROOT=${UPLOAD_PRIVATE_ROOT}
|
||||||
|
fi
|
||||||
|
|
||||||
script image_to_vm.sh \
|
script image_to_vm.sh \
|
||||||
--board="${BOARD}" \
|
--board="${BOARD}" \
|
||||||
--format="${FORMAT}" \
|
--format="${FORMAT}" \
|
||||||
--getbinpkg \
|
--getbinpkg \
|
||||||
@ -65,3 +70,4 @@ script image_to_vm.sh \
|
|||||||
--upload_root="${UPLOAD_ROOT}" \
|
--upload_root="${UPLOAD_ROOT}" \
|
||||||
--upload \
|
--upload \
|
||||||
${PRIVATE_UPLOAD_OPT}
|
${PRIVATE_UPLOAD_OPT}
|
||||||
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user