Skip to content

Commit bd78668

Browse files
committed
deploy service changes base path skip prs
1 parent 2220404 commit bd78668

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

azure/templates/deploy-service.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ steps:
191191
displayName: Create ECS Prerequisites
192192
condition: and(succeeded(), eq(variables['deploy_containers'], 'true'))
193193
194+
- bash: |
195+
echo "##vso[task.setvariable variable=SERVICE_BASE_PATH_FOR_CONDITION]${{ parameters.service_base_path }}"
196+
displayName: Set SERVICE_BASE_PATH_FOR_CONDITION
197+
198+
194199
- bash: |
195200
set -e
196201
@@ -200,7 +205,7 @@ steps:
200205
echo "DEBUG (evaluated old path): $BUILD_SOURCESDIRECTORY/${{ parameters.service_name }}/${{ parameters.service_name }}-$(BRANCH_NAME)+$(Build.BuildID)/ecs-proxies-containers.yml"
201206
202207
source $(SERVICE_DIR)/.build_env_vars
203-
export SERVICE_BASE_PATH="${{parameters.service_base_path }}"
208+
export SERVICE_BASE_PATH="${{ parameters.service_base_path }}"
204209
echo "DEBUG: SERVICE_BASE_PATH='${SERVICE_BASE_PATH}'"
205210
206211
export ASSUMED_VERSION=$(echo $SERVICE_ARTIFACT_NAME | grep -E -o "v[0-9]+\.[0-9]+\.[0-9]+-?[a-z]*" || true | tail -1)
@@ -215,7 +220,8 @@ steps:
215220
make --no-print-directory -C $(UTILS_DIR)/ansible deploy-ecs-proxies-retag
216221
217222
displayName: Retag ECS image
218-
condition: and(succeeded(), ne(variables['DEPLOY_ROLE'], ''), not(contains('${{ parameters.service_base_path }}', '-pr-')))
223+
condition: and(succeeded(), ne(variables['DEPLOY_ROLE'], ''), not(contains(variables['SERVICE_BASE_PATH_FOR_CONDITION'], '-pr-')))
224+
219225
220226
221227
- template: ../components/aws-assume-role.yml
@@ -238,6 +244,7 @@ steps:
238244
fi
239245
240246
export TF_VAR_use_ecs_tag=$([[ "${is_pull_request}" == "false" ]] && echo true || echo false)
247+
echo "DEBUG: TF_VAR_use_ecs_tag='${TF_VAR_use_ecs_tag}'"
241248
export use_ecs_tag=$TF_VAR_use_ecs_tag
242249
243250
account=${{ parameters.aws_account }} \

0 commit comments

Comments
 (0)