Skip to content

Commit 44cd06b

Browse files
committed
fix azure pipeline parameter and steps
1 parent 6421aa6 commit 44cd06b

File tree

1 file changed

+21
-26
lines changed

1 file changed

+21
-26
lines changed

azure/templates/post-deploy.yml

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ parameters:
55
default: true
66
- name: 'aws_account_type'
77
type: string
8+
- name: subscribe_mns
9+
type: boolean
10+
default: true
811

912
steps:
1013
- ${{ if parameters.is_ptl }}:
@@ -77,34 +80,26 @@ steps:
7780
displayName: Apply Terraform
7881
workingDirectory: "$(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)"
7982
retryCountOnTaskFailure: 2
80-
parameters:
81-
- name: aws_account_type
82-
type: string
83-
default: 'dev'
84-
- name: subscribe_mns
85-
type: boolean
86-
default: true # Set to true by default, false where you want to skip
8783
88-
steps:
8984
- ${{ if eq(parameters.subscribe_mns, true) }}:
90-
- bash: |
91-
export AWS_PROFILE=apim-dev
92-
echo "Subscribing SQS to MNS for notifications."
93-
pyenv install -s 3.11.11
94-
pyenv local 3.11.11
95-
echo "Setting up poetry environment..."
96-
poetry env use 3.11
97-
poetry install --no-root
98-
99-
echo "Setting PYTHONPATH..."
100-
export PYTHONPATH=$(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)/mns_subscription
101-
102-
echo "Subscribing SQS to MNS for notifications..."
103-
poetry run python src/subscribe_mns.py
104-
displayName: "Run MNS Subscription"
105-
workingDirectory: "$(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)/mns_subscription"
106-
env:
107-
SQS_ARN: "$(ID_SYNC_QUEUE_ARN)"
85+
- bash: |
86+
export AWS_PROFILE=apim-dev
87+
echo "Subscribing SQS to MNS for notifications."
88+
pyenv install -s 3.11.11
89+
pyenv local 3.11.11
90+
echo "Setting up poetry environment..."
91+
poetry env use 3.11
92+
poetry install --no-root
93+
94+
echo "Setting PYTHONPATH..."
95+
export PYTHONPATH=$(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)/mns_subscription
96+
97+
echo "Subscribing SQS to MNS for notifications..."
98+
poetry run python src/subscribe_mns.py
99+
displayName: "Run MNS Subscription"
100+
workingDirectory: "$(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)/mns_subscription"
101+
env:
102+
SQS_ARN: "$(ID_SYNC_QUEUE_ARN)"
108103
109104
- bash: |
110105
set -ex

0 commit comments

Comments
 (0)