Skip to content

Commit 85f3e89

Browse files
committed
Tidy up
1 parent 7d97b6c commit 85f3e89

5 files changed

Lines changed: 9 additions & 18 deletions

File tree

.github/actions/build-proxies/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ runs:
113113
--targetComponent "${{ inputs.targetComponent }}" \
114114
--targetWorkflow "proxy-deploy.yaml" \
115115
--targetEnvironment "${{ inputs.environment }}" \
116-
--internalRef "feature/CCM-14778" \
117116
--runId "${{ inputs.runId }}" \
118117
--buildSandbox ${{ inputs.buildSandbox }} \
119118
--apimEnvironment "${{ env.APIM_ENV }}" \

.github/scripts/dispatch_internal_repo_workflow.sh

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# ./dispatch_internal_repo_workflow.sh \
77
# --infraRepoName <repo> \
88
# --releaseVersion <version> \
9-
# --targetWorkflow "deploy.yaml" \
9+
# --targetWorkflow <workflow.yaml> \
1010
# --targetEnvironment <env> \
1111
# --targetComponent <component> \
1212
# --targetAccountGroup <group> \
@@ -285,23 +285,16 @@ echo "[INFO] Triggering workflow '$targetWorkflow' in nhs-notify-internal..."
285285
echo "[DEBUG] Dispatch event payload: $DISPATCH_EVENT"
286286

287287
trigger_response=$(curl -s -L \
288-
-w "\nHTTP_STATUS:%{http_code}" \
288+
--fail \
289289
-X POST \
290290
-H "Accept: application/vnd.github+json" \
291291
-H "Authorization: Bearer ${PR_TRIGGER_PAT}" \
292292
-H "X-GitHub-Api-Version: 2022-11-28" \
293293
"https://api.github.com/repos/NHSDigital/nhs-notify-internal/actions/workflows/$targetWorkflow/dispatches" \
294294
-d "$DISPATCH_EVENT" 2>&1)
295295

296-
http_status=$(echo "$trigger_response" | grep "HTTP_STATUS:" | cut -d: -f2)
297-
body=$(echo "$trigger_response" | grep -v "HTTP_STATUS:")
298-
299-
echo "[DEBUG] HTTP status: $http_status"
300-
echo "[DEBUG] Response body: $body"
301-
302-
if [[ "$http_status" -lt 200 || "$http_status" -ge 300 ]]; then
303-
echo "[ERROR] Failed to trigger workflow. HTTP $http_status. Response: $body"
304-
exit 1
296+
if [[ $? -ne 0 ]]; then
297+
echo "[ERROR] Failed to trigger workflow. Response: $trigger_response"
305298
fi
306299

307300
echo "[INFO] Workflow trigger request sent successfully, waiting for completion..."

.github/workflows/stage-3-build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ jobs:
189189
--terraformAction "apply" \
190190
--overrideProjectName "nhs" \
191191
--overrideRoleName "nhs-main-acct-supplier-api-github-deploy"
192-
artefact-proxy:
193-
name: "Build proxy"
192+
artefact-proxies:
193+
name: "Build proxies"
194194
runs-on: ubuntu-latest
195195
if: always() && !failure() && inputs.deploy_proxy == 'true'
196196
needs: [artefact-oas-spec, pr-create-dynamic-environment]
@@ -207,7 +207,7 @@ jobs:
207207
with:
208208
version: "${{ inputs.version }}"
209209
environment: ${{ needs.pr-create-dynamic-environment.outputs.environment_name }}
210-
apimEnv: "internal-dev-pr"
210+
apimEnv: "${{ inputs.pr_number != '' && 'internal-dev' || 'internal-dev-pr' }}"
211211
runId: "${{ github.run_id }}"
212212
buildSandbox: true
213213
releaseVersion: ${{ github.head_ref || github.ref_name }}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ jobs:
7777
--targetWorkflow "dispatch-contextual-tests-dynamic-env.yaml" \
7878
--infraRepoName "nhs-notify-supplier-api" \
7979
--releaseVersion "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \
80-
--internalRef "feature/CCM-14778" \
8180
--overrideProjectName "nhs" \
8281
--targetEnvironment "$ENVIRONMENT" \
8382
--targetAccountGroup "nhs-notify-supplier-api-dev" \

tests/e2e-tests/lib/authentication.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ def __init__(self):
1616
self.consecutive_tests = 4
1717

1818
# Number of seconds before trying a test again
19-
self.time_between_tests = 0
19+
self.time_between_tests = 10
2020

2121
# Number of attempts before giving up. It can take up to 5 minutes for the
2222
# addition of a product to an application to take effect.
2323
# time_between_tests * max_tests = 300 seconds = 5 minutes.
24-
self.max_tests = 1
24+
self.max_tests = 30
2525

2626
# How long the token will stay valid
2727
self.token_validity = 180

0 commit comments

Comments
 (0)