Skip to content

Commit 17ddf0a

Browse files
CCM-11942 Uses shared dispatch workflow with tracking
1 parent 3b29a62 commit 17ddf0a

File tree

2 files changed

+20
-25
lines changed

2 files changed

+20
-25
lines changed

.github/workflows/pr_create_dynamic_env.yaml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,3 @@ jobs:
2929
--targetComponent "branch" \
3030
--targetAccountGroup "nhs-notify-template-management-dev" \
3131
--terraformAction "apply"
32-
33-
create-sandbox-environment:
34-
name: Create Sandbox Environment
35-
runs-on: ubuntu-latest
36-
steps:
37-
- uses: actions/[email protected]
38-
- name: Trigger sandbox environment creation
39-
shell: bash
40-
env:
41-
PR_TRIGGER_PAT: ${{ secrets.PR_TRIGGER_PAT }}
42-
run: |
43-
.github/scripts/dispatch_internal_repo_workflow.sh \
44-
--jobName "Create PR Sandbox " \
45-
--infraRepoName "nhs-notify-web-template-management" \
46-
--releaseVersion "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \
47-
--targetWorkflow "dispatch-deploy-dynamic-env.yaml" \
48-
--targetEnvironment "pr${{ github.event.number }}" \
49-
--targetAccountGroup "nhs-notify-template-management-dev" \
50-
--targetComponent "sandbox" \
51-
--terraformAction "apply"
52-

.github/workflows/stage-4-acceptance.yaml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,28 @@ permissions:
88
contents: read
99

1010
jobs:
11-
acceptance-tests:
12-
name: Acceptance Tests
11+
12+
create-sandbox-environment:
13+
name: Create Sandbox Environment
1314
runs-on: ubuntu-latest
1415
steps:
1516
- uses: actions/[email protected]
1617

18+
- name: Trigger sandbox environment creation
19+
shell: bash
20+
env:
21+
PR_TRIGGER_PAT: ${{ secrets.PR_TRIGGER_PAT }}
22+
run: |
23+
.github/scripts/dispatch_internal_repo_workflow.sh \
24+
--jobName "Create PR Sandbox " \
25+
--infraRepoName "nhs-notify-web-template-management" \
26+
--releaseVersion "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \
27+
--targetWorkflow "dispatch-deploy-dynamic-env.yaml" \
28+
--targetEnvironment "pr${{ github.event.number }}" \
29+
--targetAccountGroup "nhs-notify-template-management-dev" \
30+
--targetComponent "sandbox" \
31+
--terraformAction "apply"
32+
1733
- name: Acceptance Tests
1834
shell: bash
1935
env:
@@ -22,8 +38,8 @@ jobs:
2238
.github/scripts/dispatch_internal_repo_workflow.sh \
2339
--jobName "Acceptance tests" \
2440
--infraRepoName "nhs-notify-web-template-management" \
25-
--releaseVersion "${{ github.head_ref || github.ref_name }}" \
41+
--releaseVersion "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \
2642
--targetWorkflow "dispatch-contextual-tests-dynamic-env.yaml" \
2743
--targetEnvironment "${{ needs.generate-sandbox-name.outputs.SANDBOX_NAME }}" \
2844
--targetAccountGroup "nhs-notify-template-management-dev" \
29-
--targetComponent "sandbox"
45+
--targetComponent "sandbox"

0 commit comments

Comments
 (0)