Browse Source
update script to build images to show more info and confirm
pull/80/head
Jacob McCann
6 years ago
No known key found for this signature in database
GPG Key ID: B5A476DE32B9AE72
1 changed files with
13 additions and
1 deletions
-
build-docker.sh
|
@ -13,6 +13,18 @@ minor=$(echo $tag | awk -F. '{print $2}') |
|
|
|
|
|
|
|
|
tf_ver=$(grep TERRAFORM_VERSION Dockerfile | head -n 1 | awk '{print $3}') |
|
|
tf_ver=$(grep TERRAFORM_VERSION Dockerfile | head -n 1 | awk '{print $3}') |
|
|
|
|
|
|
|
|
|
|
|
echo "Confirm building images for:" |
|
|
|
|
|
echo " MAJOR: ${major}" |
|
|
|
|
|
echo " MINOR: ${minor}" |
|
|
|
|
|
echo " TF_VERSION: ${tf_ver}" |
|
|
|
|
|
|
|
|
|
|
|
read -p "Proceed? [Y/N] " ans |
|
|
|
|
|
|
|
|
|
|
|
if [[ "$ans" != "Y" && "$ans" != "y" ]]; then |
|
|
|
|
|
echo "Cancelling" |
|
|
|
|
|
exit 0 |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
docker build -t jmccann/drone-terraform:latest . |
|
|
docker build -t jmccann/drone-terraform:latest . |
|
|
|
|
|
|
|
|
set -x |
|
|
set -x |
|
@ -24,4 +36,4 @@ docker push jmccann/drone-terraform:latest |
|
|
docker push jmccann/drone-terraform:${major} |
|
|
docker push jmccann/drone-terraform:${major} |
|
|
docker push jmccann/drone-terraform:${major}.${minor} |
|
|
docker push jmccann/drone-terraform:${major}.${minor} |
|
|
docker push jmccann/drone-terraform:${major}.${minor}-${tf_ver} |
|
|
docker push jmccann/drone-terraform:${major}.${minor}-${tf_ver} |
|
|
set +x |
|
|
set +x |
|
|