feat(recipes): adding nuo specific recipes
This commit is contained in:
15
build
15
build
@ -9,6 +9,8 @@ VERSION=${3}
|
||||
RCP_DIR="./recipes"
|
||||
PACKER=${PACKER:-packer}
|
||||
|
||||
BUILDER=${BUILDER:-qemu}
|
||||
|
||||
#
|
||||
# Init packer
|
||||
# install plugins
|
||||
@ -23,8 +25,8 @@ initPacker() {
|
||||
# First the "base" image then the provisionned ones
|
||||
#
|
||||
run() {
|
||||
${PACKER} build ${PACKER_OPTS} -var-file="${RCP_DIR}/${OS}/${VERSION}.pkrvars.hcl" -only="base.qemu.${OS}" "${RCP_DIR}/${OS}/."
|
||||
${PACKER} build ${PACKER_OPTS} -force -var-file="${RCP_DIR}/${OS}/${VERSION}.pkrvars.hcl" -except="base.qemu.${OS}" "${RCP_DIR}/${OS}/."
|
||||
${PACKER} build ${PACKER_OPTS} -var-file="${RCP_DIR}/${OS}/${VERSION}.pkrvars.hcl" -only="base.${BUILDER}.${OS}" "${RCP_DIR}/${OS}/."
|
||||
${PACKER} build ${PACKER_OPTS} -force -var-file="${RCP_DIR}/${OS}/${VERSION}.pkrvars.hcl" -except="base.${BUILER}.${OS}" "${RCP_DIR}/${OS}/."
|
||||
}
|
||||
|
||||
#
|
||||
@ -34,7 +36,7 @@ run_build() {
|
||||
target=${4}
|
||||
${PACKER} build ${PACKER_OPTS} -force \
|
||||
-var-file="${RCP_DIR}/${OS}/${VERSION}.pkrvars.hcl" \
|
||||
-only="${target}.qemu.${OS}" \
|
||||
-only="${target}.${BUILDER}.${OS}" \
|
||||
"${RCP_DIR}/${OS}/."
|
||||
}
|
||||
|
||||
@ -45,7 +47,7 @@ run_many() {
|
||||
targets="${@:4}"
|
||||
only=""
|
||||
for target in ${targets};do
|
||||
only="${only}-only=${target}.qemu.${OS} "
|
||||
only="${only}-only=${target}.${BUILDER}.${OS} "
|
||||
done
|
||||
|
||||
${PACKER} build ${PACKER_OPTS} -force \
|
||||
@ -132,6 +134,11 @@ case "${ACTION}" in
|
||||
initPacker "${2}" || exit 1
|
||||
run_build $@
|
||||
;;
|
||||
|
||||
"runVMW")
|
||||
initPacker "${2}" || exit 1
|
||||
run_build $@
|
||||
;;
|
||||
|
||||
"mrun")
|
||||
initPacker "${2}" || exit 1
|
||||
|
Reference in New Issue
Block a user