diff --git a/.github/scripts/deploy_api.sh b/.github/scripts/deploy_api.sh index 456592f89..15e18de4a 100755 --- a/.github/scripts/deploy_api.sh +++ b/.github/scripts/deploy_api.sh @@ -42,9 +42,9 @@ if [[ "${IS_PULL_REQUEST}" == "true" ]]; then fi # Determine the proxy instance based on the provided $STACK_NAME -apigee_api=prescriptions-for-patients-proxygen -apigee_client=prescriptions-for-patients-proxygen -instance="pfp-proxygen${instance_suffix}" +apigee_api=prescriptions-for-patients-v2-prod +apigee_client=prescriptions-for-patients-v2-prod +instance="prescriptions-for-patients-v2${instance_suffix}" echo "Proxy instance: ${instance}" echo "Apigee api: ${apigee_api}" @@ -99,31 +99,31 @@ echo "Retrieving proxygen credentials" # Retrieve the proxygen private key and client private key and cert from AWS Secrets Manager proxygen_private_key_arn=$(aws cloudformation list-exports --query "Exports[?Name=='secrets:${PROXYGEN_PRIVATE_KEY_NAME}'].Value" --output text) -if [[ "${ENABLE_MUTUAL_TLS}" == "true" ]]; then - echo - echo "Store the secret used for mutual TLS to AWS using Proxygen proxy lambda" - if [[ "${DRY_RUN}" == "false" ]]; then - jq -n --arg apiName "${apigee_api}" \ - --arg apiClient "${apigee_client}" \ - --arg environment "${APIGEE_ENVIRONMENT}" \ - --arg secretName "${MTLS_KEY}" \ - --arg secretKey "${client_private_key}" \ - --arg secretCert "${client_cert}" \ - --arg kid "${PROXYGEN_KID}" \ - --arg proxygenSecretName "${proxygen_private_key_arn}" \ - '{apiName: $apiName, apiClient: $apiClient, environment: $environment, secretName: $secretName, secretKey: $secretKey, secretCert: $secretCert, kid, $kid, proxygenSecretName: $proxygenSecretName}' > payload.json +# if [[ "${ENABLE_MUTUAL_TLS}" == "true" ]]; then +echo +echo "Store the secret used for mutual TLS to AWS using Proxygen proxy lambda" +if [[ "${DRY_RUN}" == "false" ]]; then + jq -n --arg apiName "${apigee_api}" \ + --arg apiClient "${apigee_client}" \ + --arg environment "${APIGEE_ENVIRONMENT}" \ + --arg secretName "${MTLS_KEY}" \ + --arg secretKey "${client_private_key}" \ + --arg secretCert "${client_cert}" \ + --arg kid "${PROXYGEN_KID}" \ + --arg proxygenSecretName "${proxygen_private_key_arn}" \ + '{apiName: $apiName, apiClient: $apiClient, environment: $environment, secretName: $secretName, secretKey: $secretKey, secretCert: $secretCert, kid, $kid, proxygenSecretName: $proxygenSecretName}' > payload.json - aws lambda invoke --function-name "${put_secret_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 "Secret stored successfully" - else - echo "Would call ${put_secret_lambda}" + aws lambda invoke --function-name "${put_secret_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 "Secret stored successfully" +else + echo "Would call ${put_secret_lambda}" fi +# fi echo echo "Deploy the API instance using Proxygen proxy lambda" diff --git a/.github/workflows/run_regression_tests.yml b/.github/workflows/run_regression_tests.yml index 51aa6e3e0..80d036130 100644 --- a/.github/workflows/run_regression_tests.yml +++ b/.github/workflows/run_regression_tests.yml @@ -79,8 +79,8 @@ jobs: GITHUB-TOKEN: ${{ steps.generate-token.outputs.token }} run: | if [[ "$TARGET_ENVIRONMENT" != "prod" && "$TARGET_ENVIRONMENT" != "ref" ]]; then - REGRESSION_TEST_REPO_TAG="v3.8.10" # This is the tag or branch of the regression test code to run, usually a version tag like v3.1.0 or a branch name - REGRESSION_TEST_WORKFLOW_TAG="v3.8.10" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG + REGRESSION_TEST_REPO_TAG="v3.8.11" # This is the tag or branch of the regression test code to run, usually a version tag like v3.1.0 or a branch name + REGRESSION_TEST_WORKFLOW_TAG="v3.8.11" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG if [[ -z "$REGRESSION_TEST_REPO_TAG" || -z "$REGRESSION_TEST_WORKFLOW_TAG" ]]; then echo "Error: One or both tag variables are not set" >&2 @@ -121,8 +121,8 @@ jobs: GITHUB-TOKEN: ${{ steps.generate-token.outputs.token }} run: | if [[ "$TARGET_ENVIRONMENT" != "prod" && "$TARGET_ENVIRONMENT" != "ref" ]]; then - REGRESSION_TEST_REPO_TAG="v3.8.10" # This is the tag or branch of the regression test code to run, usually a version tag like v3.1.0 or a branch name - REGRESSION_TEST_WORKFLOW_TAG="v3.8.10" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG + REGRESSION_TEST_REPO_TAG="v3.8.11" # This is the tag or branch of the regression test code to run, usually a version tag like v3.1.0 or a branch name + REGRESSION_TEST_WORKFLOW_TAG="v3.8.11" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG if [[ -z "$REGRESSION_TEST_REPO_TAG" || -z "$REGRESSION_TEST_WORKFLOW_TAG" ]]; then echo "Error: One or both tag variables are not set" >&2 diff --git a/.github/workflows/sam_release_code.yml b/.github/workflows/sam_release_code.yml index 1ca9313f6..f2261f05e 100644 --- a/.github/workflows/sam_release_code.yml +++ b/.github/workflows/sam_release_code.yml @@ -205,7 +205,7 @@ jobs: AWS_ENVIRONMENT: ${{ inputs.TARGET_ENVIRONMENT }} APIGEE_ENVIRONMENT: ${{ inputs.APIGEE_ENVIRONMENT }} PROXYGEN_PRIVATE_KEY_NAME: PrescriptionsForPatientsProxygenPrivateKey - PROXYGEN_KID: prescriptions-for-patients + PROXYGEN_KID: "2026-01-22-PROD-prescriptions-for-patients-v2" DRY_RUN: false ENABLE_MUTUAL_TLS: ${{ inputs.ENABLE_MUTUAL_TLS }} MTLS_KEY: ${{ inputs.MTLS_KEY }} diff --git a/packages/specification/prescriptions-for-patients.yaml b/packages/specification/prescriptions-for-patients.yaml index ea1d78541..419cf0007 100644 --- a/packages/specification/prescriptions-for-patients.yaml +++ b/packages/specification/prescriptions-for-patients.yaml @@ -4,7 +4,7 @@ openapi: 3.0.3 info: - title: Prescriptions for Patients API + title: Prescriptions for Patients API v2 version: "0.0.1" contact: name: Prescriptions for Patients API Support