Skip to content

Commit 75ebe09

Browse files
committed
APM-1216 Use runtime expression and add release deployments
1 parent 16f0083 commit 75ebe09

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/continuous-integration.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,13 @@ jobs:
2020
echo BRANCH_NAME=${BRANCH_NAME}
2121
echo NOTIFY_COMMIT_SHA=${NOTIFY_COMMIT_SHA}
2222
python3 scripts/test_pull_request_deployments.py
23+
24+
- name: Test Release Deployments
25+
env:
26+
AZURE_TOKEN: "${{ secrets.AZURE_TOKEN }}"
27+
run: |
28+
export BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
29+
export NOTIFY_COMMIT_SHA="${{ github.event.pull_request.head.sha }}"
30+
echo BRANCH_NAME=${BRANCH_NAME}
31+
echo NOTIFY_COMMIT_SHA=${NOTIFY_COMMIT_SHA}
32+
python3 scripts/test_release_deployments.py

azure/common/apigee-deployment.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ extends:
142142
${{ if notIn(param.key, 'apigee_deployments', '_scoped_pipeline_vars', '_scoped_step_list_vars', '_pipeline_defaults') }}:
143143
${{ if not(contains(join(',', parameters._scoped_pipeline_vars), param.key)) }}:
144144
${{ param.key }}: ${{ param.value }}
145-
utils_pr_number: $(UTILS_PR_NUMBER)
145+
# Exists if triggered from a utils pull_request
146+
utils_pr_number: $[variables.UTILS_PR_NUMBER]
146147

147148
${{ each pipeline_default in parameters._pipeline_defaults }}:
148149
${{ if endsWith(variables['Build.DefinitionName'], pipeline_default.name_suffix) }}:

scripts/trigger_pipelines.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ def __init__(self, utils_pr_number: int = None):
1010
self.base_url = "https://dev.azure.com/NHSD-APIM/API Platform/_apis/pipelines"
1111
self.token = os.environ["AZURE_TOKEN"]
1212
self.auth = requests.auth.HTTPBasicAuth("", self.token)
13-
self.branch_name = os.environ["BRANCH_NAME"]
1413
self.notify_commit_sha = os.environ["NOTIFY_COMMIT_SHA"]
1514
self.utils_pr_number = utils_pr_number
1615
self.notify_github_repo = "NHSDigital/api-management-utils"

0 commit comments

Comments
 (0)