Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions .github/scripts/deploy_api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/run_regression_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sam_release_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion packages/specification/prescriptions-for-patients.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading