Skip to content

Commit 076124b

Browse files
committed
Fix formatting inconsistencies in deploy-stage.yml and update display names for clarity
1 parent 212e214 commit 076124b

1 file changed

Lines changed: 37 additions & 44 deletions

File tree

azure/common/deploy-stage.yml

Lines changed: 37 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ parameters:
2222
- name: fully_qualified_service_name
2323
- name: service_base_path
2424
- name: pr_label
25-
default: ''
25+
default: ""
2626
- name: secret_file_ids
2727
type: object
2828
- name: secret_ids
@@ -123,7 +123,7 @@ stages:
123123
role: "auto-ops"
124124
profile: "apm_${{ parameters.aws_account }}"
125125
aws_account: "${{ parameters.aws_account }}"
126-
126+
127127
- bash: |
128128
pyversion="3.13"
129129
PATCH=$(curl -fsSL https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json \
@@ -133,20 +133,13 @@ stages:
133133
echo "##vso[task.setvariable variable=PY_VER]$PATCH"
134134
echo "Resolved latest python version: $PATCH"
135135
echo "##vso[task.setvariable variable=LD_LIBRARY_PATH;]/agent/_work/_tool/Python/${PATCH}/x64/lib/"
136-
displayName: 'Query and set python tool cache path'
137-
136+
displayName: "Query and set python tool cache path"
138137
139138
- task: UsePythonVersion@0
140139
name: UsePy
141-
displayName: 'Use Python 3.13'
140+
displayName: "Use Python 3.13"
142141
inputs:
143-
versionSpec: '$(PY_VER)'
144-
145-
# - bash: |
146-
# echo "Checking the python version in use to set LD_LIBRARY_PATH"
147-
# echo "Python location: $(UsePy.pythonLocation)"
148-
# echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]$(UsePy.pythonLocation)/lib"
149-
# displayName: 'Set LD_LIBRARY_PATH'
142+
versionSpec: "$(PY_VER)"
150143

151144
- template: "../components/set-facts.yml"
152145
parameters:
@@ -173,27 +166,27 @@ stages:
173166
apigee_organization: ${{ parameters.apigee_organization }}
174167

175168
- ${{ if parameters.notify }}:
176-
- bash: |
177-
if [[ -z $(NOTIFY_COMMIT_SHA) ]]; then
178-
export NOTIFY_COMMIT_SHA=`echo "$(Build.SourceVersionMessage)" | cut -d' ' -f2`
179-
echo "##vso[task.setvariable variable=NOTIFY_COMMIT_SHA]$NOTIFY_COMMIT_SHA"
180-
else
181-
echo "##[debug]Using already provided NOTIFY_COMMIT_SHA=$(NOTIFY_COMMIT_SHA)"
182-
fi
183-
displayName: Set NOTIFY_COMMIT_SHA
169+
- bash: |
170+
if [[ -z $(NOTIFY_COMMIT_SHA) ]]; then
171+
export NOTIFY_COMMIT_SHA=`echo "$(Build.SourceVersionMessage)" | cut -d' ' -f2`
172+
echo "##vso[task.setvariable variable=NOTIFY_COMMIT_SHA]$NOTIFY_COMMIT_SHA"
173+
else
174+
echo "##[debug]Using already provided NOTIFY_COMMIT_SHA=$(NOTIFY_COMMIT_SHA)"
175+
fi
176+
displayName: Set NOTIFY_COMMIT_SHA
184177
185-
- template: '../components/update-github-status.yml'
186-
parameters:
187-
state: pending
188-
description: "Deploy to ${{ parameters.environment }} started"
189-
environment: ${{ parameters.environment }}
178+
- template: "../components/update-github-status.yml"
179+
parameters:
180+
state: pending
181+
description: "Deploy to ${{ parameters.environment }} started"
182+
environment: ${{ parameters.environment }}
190183

191184
- ${{ each param in parameters }}:
192-
- ${{ if not(containsValue(parameters._expose_blacklist, param.key)) }}:
193-
- bash: |
194-
set -euo pipefail
195-
echo "##vso[task.setvariable variable=${{ upper(param.key) }}]${{ param.value }}"
196-
displayName: Setting ${{ upper(param.key) }}=${{ param.value }}
185+
- ${{ if not(containsValue(parameters._expose_blacklist, param.key)) }}:
186+
- bash: |
187+
set -euo pipefail
188+
echo "##vso[task.setvariable variable=${{ upper(param.key) }}]${{ param.value }}"
189+
displayName: Setting ${{ upper(param.key) }}=${{ param.value }}
197190
198191
- bash: |
199192
set -euo pipefail
@@ -261,7 +254,7 @@ stages:
261254
displayName: Check supplied names against API registry
262255
continueOnError: true
263256
264-
- template: '../templates/deploy-service.yml'
257+
- template: "../templates/deploy-service.yml"
265258
parameters:
266259
service_name: ${{ parameters.service_name }}
267260
short_service_name: ${{ parameters.short_service_name }}
@@ -282,7 +275,7 @@ stages:
282275
post_deploy: ${{ parameters.post_deploy }}
283276
ping: ${{ parameters.ping }}
284277
enable_monitoring: ${{ parameters.enable_monitoring }}
285-
enable_status_monitoring : ${{ parameters.enable_status_monitoring }}
278+
enable_status_monitoring: ${{ parameters.enable_status_monitoring }}
286279
portal_api_requires_callback_url: ${{ parameters.portal_api_requires_callback_url }}
287280
make_spec_visible: ${{ parameters.make_spec_visible }}
288281
friendly_api_name: ${{ parameters.friendly_api_name }}
@@ -291,16 +284,16 @@ stages:
291284
aws_account: ${{ parameters.aws_account }}
292285

293286
- ${{ if parameters.notify }}:
294-
- template: '../components/update-github-status.yml'
295-
parameters:
296-
state: success
297-
on_success: true
298-
description: "Deploy to ${{ parameters.environment }} succeeded"
299-
environment: ${{ parameters.environment }}
287+
- template: "../components/update-github-status.yml"
288+
parameters:
289+
state: success
290+
on_success: true
291+
description: "Deploy to ${{ parameters.environment }} succeeded"
292+
environment: ${{ parameters.environment }}
300293

301-
- template: '../components/update-github-status.yml'
302-
parameters:
303-
state: failure
304-
on_failure: true
305-
description: "Deploy to ${{ parameters.environment }} failed"
306-
environment: ${{ parameters.environment }}
294+
- template: "../components/update-github-status.yml"
295+
parameters:
296+
state: failure
297+
on_failure: true
298+
description: "Deploy to ${{ parameters.environment }} failed"
299+
environment: ${{ parameters.environment }}

0 commit comments

Comments
 (0)