From a11a38dc4dc7a961eb06dff97228137f30654b1c Mon Sep 17 00:00:00 2001 From: tstephen-nhs <231503406+tstephen-nhs@users.noreply.github.com> Date: Thu, 12 Feb 2026 14:01:10 +0000 Subject: [PATCH 1/3] chore: re-enable int spec publication --- .github/scripts/deploy_api.sh | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/scripts/deploy_api.sh b/.github/scripts/deploy_api.sh index 77b320a30..ff021cd54 100755 --- a/.github/scripts/deploy_api.sh +++ b/.github/scripts/deploy_api.sh @@ -150,31 +150,31 @@ else echo "Would call ${instance_put_lambda}" fi -# if [[ "${APIGEE_ENVIRONMENT}" == "int" ]]; then -# echo -# echo "Deploy the API spec to prod catalogue as it is int environment" -# if [[ "${DRY_RUN}" == "false" ]]; then -# jq -n --argfile spec "${SPEC_PATH}" \ -# --arg apiName "${apigee_api}" \ -# --arg apiClient "${apigee_client}" \ -# --arg environment "prod" \ -# --arg instance "${instance}" \ -# --arg kid "${PROXYGEN_KID}" \ -# --arg proxygenSecretName "${proxygen_private_key_arn}" \ -# '{apiName: $apiName, apiClient: $apiClient, environment: $environment, specDefinition: $spec, instance: $instance, kid: $kid, proxygenSecretName: $proxygenSecretName}' > payload.json - -# aws lambda invoke --function-name "${spec_publish_lambda}" --cli-binary-format raw-in-base64-out --payload file://payload.json out.txt > response.json - -# if eval "cat response.json | jq -e '.FunctionError' >/dev/null"; then -# echo 'Error calling lambda' -# cat out.txt -# exit 1 -# fi -# echo "Spec deployed" -# else -# echo "Would call ${spec_publish_lambda}" -# fi -# fi +if [[ "${APIGEE_ENVIRONMENT}" == "int" ]]; then + echo + echo "Deploy the API spec to prod catalogue as it is int environment" + if [[ "${DRY_RUN}" == "false" ]]; then + jq -n --argfile spec "${SPEC_PATH}" \ + --arg apiName "${apigee_api}" \ + --arg apiClient "${apigee_client}" \ + --arg environment "prod" \ + --arg instance "${instance}" \ + --arg kid "${PROXYGEN_KID}" \ + --arg proxygenSecretName "${proxygen_private_key_arn}" \ + '{apiName: $apiName, apiClient: $apiClient, environment: $environment, specDefinition: $spec, instance: $instance, kid: $kid, proxygenSecretName: $proxygenSecretName}' > payload.json + + aws lambda invoke --function-name "${spec_publish_lambda}" --cli-binary-format raw-in-base64-out --payload file://payload.json out.txt > response.json + + if eval "cat response.json | jq -e '.FunctionError' >/dev/null"; then + echo 'Error calling lambda' + cat out.txt + exit 1 + fi + echo "Spec deployed" + else + echo "Would call ${spec_publish_lambda}" + fi +fi if [[ "${APIGEE_ENVIRONMENT}" == "internal-dev" && "${IS_PULL_REQUEST}" == "false" ]]; then echo From 58e07dd4d3c8ea477db708bac0a99b16bafd85c5 Mon Sep 17 00:00:00 2001 From: tstephen-nhs <231503406+tstephen-nhs@users.noreply.github.com> Date: Thu, 12 Feb 2026 14:14:05 +0000 Subject: [PATCH 2/3] test: temp enable spec publication from PR --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 6bee47946..dbed446e5 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -99,7 +99,7 @@ jobs: needs: [get_issue_number, package_code, get_commit_id] uses: ./.github/workflows/sam_release_code.yml with: - IS_PULL_REQUEST: true + IS_PULL_REQUEST: false # temp to test spec publication: true STACK_NAME: pfp-pr-${{needs.get_issue_number.outputs.issue_number}} ARTIFACT_BUCKET_PREFIX: PR-${{needs.get_issue_number.outputs.issue_number}} TARGET_ENVIRONMENT: dev From 6ae4e221ba60ccc3cf2a115c4172ef0028f90a35 Mon Sep 17 00:00:00 2001 From: tstephen-nhs <231503406+tstephen-nhs@users.noreply.github.com> Date: Thu, 12 Feb 2026 15:57:25 +0000 Subject: [PATCH 3/3] Revert "test: temp enable spec publication from PR" This reverts commit 58e07dd4d3c8ea477db708bac0a99b16bafd85c5. --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index dbed446e5..6bee47946 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -99,7 +99,7 @@ jobs: needs: [get_issue_number, package_code, get_commit_id] uses: ./.github/workflows/sam_release_code.yml with: - IS_PULL_REQUEST: false # temp to test spec publication: true + IS_PULL_REQUEST: true STACK_NAME: pfp-pr-${{needs.get_issue_number.outputs.issue_number}} ARTIFACT_BUCKET_PREFIX: PR-${{needs.get_issue_number.outputs.issue_number}} TARGET_ENVIRONMENT: dev