diff --git a/infrastructure/ecs_services/ecr.tf b/infrastructure/ecs_services/ecr.tf index db6c320..426ad7b 100644 --- a/infrastructure/ecs_services/ecr.tf +++ b/infrastructure/ecs_services/ecr.tf @@ -65,11 +65,28 @@ resource "null_resource" "build_worker_ecr_image" { provisioner "local-exec" { command = <&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 } }