File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 5252 make init && make destroy aws_account_no=${account_id} environment=$(WORKSPACE)
5353 displayName: Destroy terraform PR workspace and linked resources
5454 retryCountOnTaskFailure: 2
55+
56+ - bash : |
57+ export AWS_PROFILE=apim-dev
58+ pyenv install -s 3.11.11
59+ pyenv local 3.11.11
60+ poetry env use 3.11
61+ poetry install --no-root
62+
63+ export PYTHONPATH=$(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)/mns_subscription
64+
65+ echo "Deleting SQS Subscription from MNS..."
66+ poetry run python src/unsubscribe_mns.py
67+ displayName: "Delete MNS Subscription"
68+ workingDirectory: "$(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)/mns_subscription"
69+ env:
70+ SQS_ARN: "$(ID_SYNC_QUEUE_ARN)"
Original file line number Diff line number Diff line change 1313)
1414
1515SQS_ARN = os .getenv ("SQS_ARN" )
16- MNS_URL = "https://int.api.service.nhs.uk/multicast-notification-service/subscriptions"
16+
17+ apigee_env = os .getenv ("APIGEE_ENVIRONMENT" , "int" )
18+ MNS_URL = "https://api.service.nhs.uk/multicast-notification-service/subscriptions" \
19+ if apigee_env == "prod" else "https://int.api.service.nhs.uk/multicast-notification-service/subscriptions"
1720
1821
1922class MnsService :
@@ -45,6 +48,7 @@ def subscribe_notification(self) -> dict | None:
4548
4649 print (f"Access Token: { self .access_token } " )
4750 print (f"SQS ARN: { SQS_ARN } " )
51+ print (f"MNS_URL: { MNS_URL } " )
4852 print (f"Headers: { self .request_headers } " )
4953 print (f"Payload: { json .dumps (self .subscription_payload , indent = 2 )} " )
5054
You can’t perform that action at this time.
0 commit comments