Skip to content

Commit 4944d28

Browse files
committed
ansible updates containers
1 parent 93a9299 commit 4944d28

File tree

4 files changed

+18
-21
lines changed

4 files changed

+18
-21
lines changed

ansible/deploy-ecs-proxies-retag.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,19 @@
33
connection: local
44
gather_facts: no
55

6-
76
vars:
87
service_id: "{{ lookup('env','service_id') }}"
98
APIGEE_ENVIRONMENT: "{{ lookup('env','APIGEE_ENVIRONMENT') }}"
109
account: "{{ lookup('env','account') }}"
1110

1211
pre_tasks:
13-
- name: Show PROXY_VARS_FILE from environment
12+
- name: Show CONTAINER_VARS_FILE from environment
1413
debug:
15-
msg: "PROXY_VARS_FILE={{ lookup('env','PROXY_VARS_FILE') }}"
14+
msg: "CONTAINER_VARS_FILE={{ lookup('env','CONTAINER_VARS_FILE') }}"
1615

1716
- name: include container vars
1817
include_vars:
19-
file: "{{ lookup('env', 'PROXY_VARS_FILE') | expandvars | expanduser | realpath }}"
18+
file: "{{ lookup('env', 'CONTAINER_VARS_FILE') | expandvars | expanduser | realpath }}"
2019

2120
- name: Debug docker_containers
2221
debug:

ansible/roles/deploy-ecs-proxies-retag/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- name: Ensure docker_containers is loaded
22
include_vars:
3-
file: "{{ lookup('env', 'PROXY_VARS_FILE') }}"
3+
file: "{{ lookup('env', 'CONTAINER_VARS_FILE') }}"
44
when: docker_containers is not defined
55

66
- name: Debug docker_containers (retag role)
@@ -18,7 +18,7 @@
1818
- name: Debug pulling image
1919
debug:
2020
msg: "Pulling {{ ecr_registry }}/{{ item }}:{{ build_label }}"
21-
with_items: "{{ repo_names }}"
21+
with_items: "{{ repo_names }}"
2222

2323
- name: Pull existing image {{ item }}:{{ build_label }}
2424
ansible.builtin.command:
File renamed without changes.

azure/templates/deploy-service.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -191,26 +191,24 @@ steps:
191191
displayName: Create ECS Prerequisites
192192
condition: and(succeeded(), eq(variables['deploy_containers'], 'true'))
193193
194-
- bash: |
195-
set -e
194+
- bash: |
195+
set -e
196196
197-
proxy_vars_file="${PROXY_VARS_FILE}"
198-
echo "DEBUG: proxy_vars_file='${proxy_vars_file}'"
199-
source $(SERVICE_DIR)/.build_env_vars
197+
echo "DEBUG: CONTAINER_VARS_FILE='${CONTAINER_VARS_FILE}'"
198+
source $(SERVICE_DIR)/.build_env_vars
200199
201-
export ASSUMED_VERSION=$(echo $SERVICE_ARTIFACT_NAME | grep -E -o "v[0-9]+\.[0-9]+\.[0-9]+-?[a-z]*" || true | tail -1)
202-
export DEPLOYED_VERSION=${ASSUMED_VERSION:-${{ parameters.fully_qualified_service_name }}}
200+
export ASSUMED_VERSION=$(echo $SERVICE_ARTIFACT_NAME | grep -E -o "v[0-9]+\.[0-9]+\.[0-9]+-?[a-z]*" || true | tail -1)
201+
export DEPLOYED_VERSION=${ASSUMED_VERSION:-${{ parameters.fully_qualified_service_name }}}
203202
204-
account=${{ parameters.aws_account }} \
205-
PROXY_VARS_FILE="${proxy_vars_file}" \
206-
SOURCE_COMMIT_ID="$(Build.SourceVersion)" \
207-
RELEASE_RELEASEID="$(Build.BuildId)" \
203+
account=${{ parameters.aws_account }} \
204+
CONTAINER_VARS_FILE="${CONTAINER_VARS_FILE}" \
205+
SOURCE_COMMIT_ID="$(Build.SourceVersion)" \
206+
RELEASE_RELEASEID="$(Build.BuildId)" \
207+
make --no-print-directory -C $(UTILS_DIR)/ansible deploy-ecs-proxies-retag
208208
209+
displayName: Retag ECS image
210+
condition: and(succeeded(), ne(variables['DEPLOY_ROLE'], ''))
209211

210-
make --no-print-directory -C $(UTILS_DIR)/ansible deploy-ecs-proxies-retag
211-
212-
displayName: Retag ECS image
213-
condition: and(succeeded(), ne(variables['DEPLOY_ROLE'], ''))
214212

215213
- template: ../components/aws-assume-role.yml
216214
parameters:

0 commit comments

Comments
 (0)