File tree Expand file tree Collapse file tree 4 files changed +8
-40
lines changed
deploy-ecs-proxies-retag/tasks Expand file tree Collapse file tree 4 files changed +8
-40
lines changed Original file line number Diff line number Diff line change 99 account : " {{ lookup('env','account') }}"
1010
1111 pre_tasks :
12- - name : Show CONTAINER_VARS_FILE from environment
13- debug :
14- msg : " CONTAINER_VARS_FILE={{ lookup('env','CONTAINER_VARS_FILE') }}"
15-
1612 - name : include container vars
1713 include_vars :
1814 file : " {{ lookup('env', 'CONTAINER_VARS_FILE') | expandvars | expanduser | realpath }}"
19-
20- - name : Debug docker_containers
21- debug :
22- var : docker_containers
23-
24- - name : Debug containers
25- debug :
26- var : containers
2715
2816 roles :
2917 - setup-facts
Original file line number Diff line number Diff line change 33 file : " {{ lookup('env', 'CONTAINER_VARS_FILE') }}"
44 when : docker_containers is not defined
55
6- - name : Debug docker_containers (retag role)
7- debug :
8- var : docker_containers
9-
10- - name : Debug containers (retag role)
11- debug :
12- var : containers
13-
14- - name : Debug repo_names (retag role)
15- debug :
16- var : repo_names
17-
186- name : Login to ECR
197 shell : >
208 {{ aws_cmd }} ecr get-login-password --region {{ aws_region }}
219 | docker login --username AWS --password-stdin {{ ecr_registry }}
2210
23- - name : Debug pulling image
11+ - name : Pulling ECR image
2412 debug :
25- msg : " Pulling {{ ecr_registry }}/{{ item }}:{{ build_label }}"
13+ msg : " Pulling {{ item }}:{{ build_label }}"
2614 loop : " {{ repo_names }}"
2715 loop_control :
2816 label : " {{ item }}"
3624 label : " {{ item }}"
3725 register : pull_results
3826
39- - name : Debug retagging image
27+ - name : Retagging ECR image
4028 debug :
4129 msg : " Retagging {{ item.item }}:{{ build_label }} → ecs-{{ build_label }}"
4230 loop : " {{ pull_results.results }}"
5947 - item.rc == 0
6048 - item.item == "canary_canary-api"
6149
62- - name : Debug pushing image
50+ - name : Pushing ECR image
6351 debug :
6452 msg : " Pushing ecs-{{ build_label }} for {{ item.item }}"
6553 loop : " {{ pull_results.results }}"
Original file line number Diff line number Diff line change 7171 with_filetree : " {{ '../templates' }}"
7272 when : item.state == 'file'
7373
74- - name : ansible debug use_ecs_tag before terraform
74+ - name : ansible use_ecs_tag before terraform
7575 debug :
7676 msg : >
7777 ANSIBLE: use_ecs_tag='{{ use_ecs_tag }}'
8484 failed_when : tfplan.rc not in (0, 2)
8585 when : not do_not_terraform
8686
87- - name : print full terraform plan output (lines)
88- debug :
89- var : tfplan.stdout_lines
90- when : tfplan is defined
91-
9287 - name : terraform apply
9388 shell : " TF_VAR_use_ecs_tag={{ use_ecs_tag | ternary('true','false') }} make -C {{ out_dir }}/terraform apply-plan args='-no-color -lock-timeout=30m --auto-approve tfplan.out'" # noqa 305
9489 register : tfapply
Original file line number Diff line number Diff line change @@ -201,12 +201,9 @@ steps:
201201
202202 export CONTAINER_VARS_FILE="$SERVICE_DIR/ecs-proxies-containers.yml"
203203
204- echo "DEBUG: CONTAINER_VARS_FILE='${CONTAINER_VARS_FILE}'"
205- echo "DEBUG (evaluated old path): $BUILD_SOURCESDIRECTORY/${{ parameters.service_name }}/${{ parameters.service_name }}-$(BRANCH_NAME)+$(Build.BuildID)/ecs-proxies-containers.yml"
206-
207204 source $(SERVICE_DIR)/.build_env_vars
208205 export SERVICE_BASE_PATH="${{ parameters.service_base_path }}"
209- echo "DEBUG: SERVICE_BASE_PATH='${SERVICE_BASE_PATH}'"
206+ echo "SERVICE_BASE_PATH='${SERVICE_BASE_PATH}'"
210207
211208 export ASSUMED_VERSION=$(echo $SERVICE_ARTIFACT_NAME | grep -E -o "v[0-9]+\.[0-9]+\.[0-9]+-?[a-z]*" || true | tail -1)
212209 export DEPLOYED_VERSION=${ASSUMED_VERSION:-${{ parameters.fully_qualified_service_name }}}
@@ -248,8 +245,8 @@ steps:
248245 export TF_VAR_use_ecs_tag=true
249246 fi
250247
251- echo "DEBUG: TF_VAR_use_ecs_tag='${TF_VAR_use_ecs_tag}'"
252- echo "DEBUG: SERVICE_BASE_PATH='${SERVICE_BASE_PATH}'"
248+ echo "TF_VAR_use_ecs_tag='${TF_VAR_use_ecs_tag}'"
249+ echo "SERVICE_BASE_PATH='${SERVICE_BASE_PATH}'"
253250
254251 export use_ecs_tag=$TF_VAR_use_ecs_tag
255252
You can’t perform that action at this time.
0 commit comments