mirror of
https://github.com/outbackdingo/ack-image-builder.git
synced 2026-01-27 10:18:13 +00:00
build/build.sh: fix missing params checking
Signed-off-by: Yilong Ren <yilong.ryl@alibaba-inc.com>
This commit is contained in:
@@ -7,8 +7,13 @@ read -p "The Docker version is:" DOCKER_VERSION
|
||||
read -p "The kubernetes version is:" KUBE_VERSION
|
||||
|
||||
## check params
|
||||
if [[ -z $ACCESS_KEY || -z $SECRET_KEY || -z $REGION ]]; then
|
||||
printf "[ERROR] `date '+%F %T'` following parameters is empty:\naccess_key=${ACCESS_KEY}\nsecret_key=${SECRET_KEY}\nregion=${REGION}\ninstance_type=${INSTANCE_TYPE}\nsource_image=${SOURCE_IMAGE}\nimage_name=${IMAGE_NAME}"
|
||||
if [[ -z $ACCESS_KEY || -z $SECRET_KEY || -z $REGION || -z $DOCKER_VERSION || -z $KUBE_VERSION ]]; then
|
||||
echo -e "[ERROR] $(date '+%F %T') following parameters is empty:
|
||||
access_key=${ACCESS_KEY}
|
||||
secret_key=${SECRET_KEY}
|
||||
region=${REGION}
|
||||
docker_version=${DOCKER_VERSION}
|
||||
kube_version=${KUBE_VERSION}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user