packer/build-image: fail earlier without a board file.
This commit is contained in:
parent
41d955b195
commit
d3b1b427aa
|
@ -30,17 +30,16 @@ preflight () {
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
custom)
|
custom)
|
||||||
PACKER_BUILD_FILE="${2:-}"
|
|
||||||
if [ "${SKIP_LOCAL_CACHE}" != "yes" ]
|
|
||||||
then
|
|
||||||
REMOTE_IMAGE_URL="$(jq '.builders[0].file_urls' ${PACKER_BUILD_FILE} | grep https | tr -d ' \",')"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${PACKER_BUILD_FILE}" ]
|
if [ -z "${PACKER_BUILD_FILE}" ]
|
||||||
then
|
then
|
||||||
errmsg "[!] custom board requires a board file path"
|
errmsg "[!] custom board requires a board file path"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${SKIP_LOCAL_CACHE}" != "yes" ]
|
||||||
|
then
|
||||||
|
REMOTE_IMAGE_URL="$(jq '.builders[0].file_urls' ${PACKER_BUILD_FILE} | grep https | tr -d ' \",')"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
errmsg "[!] invalid image type ${IMAGE_TYPE}."
|
errmsg "[!] invalid image type ${IMAGE_TYPE}."
|
||||||
|
|
Loading…
Reference in New Issue