Skip to content

Commit

Permalink
Revert to use X86 architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
amarouane-ABDELHAK committed Jul 18, 2024
1 parent 8ec5229 commit 18a2740
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion infrastructure/ecs_services/ecr.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,28 @@ resource "null_resource" "build_worker_ecr_image" {

provisioner "local-exec" {
command = <<EOF
exit_status () {
STATUS=$?
RED='\033[0;31m' # Red Text
GREEN='\033[0;32m' # Green Text
BLUE='\033[0;34m' # Blue Text
NC='\033[0m' # No Color
if [ "$STATUS" -eq 0 ]; then
printf "\n $GREEN WORKER Docker Image Successfull: $1 $NC \n"
else
printf "\n $RED WORKER Docker Image failed: $1 $NC \n" >&2
exit $STATUS
fi
}
cd ../${path.root}
aws ecr get-login-password --region ${var.aws_region} | docker login --username AWS --password-stdin ${var.account_id}.dkr.ecr.${var.aws_region}.amazonaws.com
docker buildx build -t ${aws_ecr_repository.worker_airflow.repository_url}:latest -f airflow_worker/Dockerfile .
docker buildux build -t ${aws_ecr_repository.worker_airflow.repository_url}:latest -f airflow_worker/Dockerfile .
exit_status "build"
docker push ${aws_ecr_repository.worker_airflow.repository_url}:latest
exit_status "push"
cd -
EOF
}
}
Expand Down

0 comments on commit 18a2740

Please sign in to comment.