From 6943988284386da6ee05791ee1f349fb3cd5cd7b Mon Sep 17 00:00:00 2001 From: Giacomo Marciani Date: Mon, 16 Oct 2023 14:58:58 +0200 Subject: [PATCH] [Ops] Added log lines in build_and_release_image.sh. --- scripts/build_and_release_image.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/build_and_release_image.sh b/scripts/build_and_release_image.sh index 076ed159..1ae33cc1 100755 --- a/scripts/build_and_release_image.sh +++ b/scripts/build_and_release_image.sh @@ -51,12 +51,17 @@ elif ! [[ $TAG =~ [0-9]{4}\.(0[1-9]|1[0-2])\.[0-9]+ ]]; then exit 1 fi +echo "[INFO] Logging in ${ECR_ENDPOINT}" aws ecr-public get-login-password --region "$ECR_REGION" | docker login --username AWS --password-stdin "${ECR_ENDPOINT}" +echo "[INFO] Building frontend" + pushd frontend if [ ! -d node_modules ]; then npm install fi + +echo "[INFO] Building image" docker build --build-arg PUBLIC_URL=/ -t frontend-awslambda . popd docker build -f Dockerfile.awslambda -t ${ECR_REPO} . @@ -64,10 +69,12 @@ docker build -f Dockerfile.awslambda -t ${ECR_REPO} . ECR_IMAGE_VERSION_TAGGED=${ECR_ENDPOINT}/${ECR_REPO}:${TAG} ECR_IMAGE_LATEST_TAGGED=${ECR_ENDPOINT}/${ECR_REPO}:latest +echo "[INFO] Pushing image ${ECR_IMAGE_VERSION_TAGGED} in repository ${ECR_REPO}" + docker tag ${ECR_REPO} ${ECR_IMAGE_VERSION_TAGGED} docker push ${ECR_IMAGE_VERSION_TAGGED} docker tag ${ECR_REPO} ${ECR_IMAGE_LATEST_TAGGED} docker push ${ECR_IMAGE_LATEST_TAGGED} -echo "Uploaded: ${ECR_IMAGE_VERSION_TAGGED}, ${ECR_IMAGE_LATEST_TAGGED}" \ No newline at end of file +echo "[INFO] Uploaded: ${ECR_IMAGE_VERSION_TAGGED}, ${ECR_IMAGE_LATEST_TAGGED}" \ No newline at end of file