Skip to content

Commit

Permalink
Chore: [AEA-4133] - Stop deploying old stack (#1201)
Browse files Browse the repository at this point in the history
## Summary
- Routine Change
- ❗ Breaking Change
- 🤖 Operational or Infrastructure Change
### Details
- Removes old stack
  - Removes pipeline elements
  - Removes API GW handler from getMyPrescriptions
  - Updates fhir middy handler version
- Updates getMyPrescriptions tests to all use the step function handler
and expect responses inline with error handler update
  • Loading branch information
Orkastrated authored Aug 20, 2024
1 parent 9527c4c commit 0ae6548
Show file tree
Hide file tree
Showing 14 changed files with 130 additions and 866 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,6 @@ jobs:
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }}
TARGET_SPINE_SERVER: ${{ secrets.DEV_TARGET_SPINE_SERVER }}
TARGET_SERVICE_SEARCH_SERVER: ${{ secrets.DEV_TARGET_SERVICE_SEARCH_SERVER }}

release_code_old:
needs: [get_issue_number, package_code, get_commit_id]
uses: ./.github/workflows/sam_release_code.yml
with:
STACK_NAME: pr-${{needs.get_issue_number.outputs.issue_number}}
ARTIFACT_BUCKET_PREFIX: PR-${{needs.get_issue_number.outputs.issue_number}}
TARGET_ENVIRONMENT: dev-pr
ENABLE_MUTUAL_TLS: false
BUILD_ARTIFACT: packaged_code_old
TRUSTSTORE_FILE: truststore.pem
VERSION_NUMBER: PR-${{ needs.get_issue_number.outputs.issue_number }}
COMMIT_ID: ${{ needs.get_commit_id.outputs.commit_id }}
LOG_LEVEL: DEBUG
LOG_RETENTION_DAYS: 30
secrets:
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }}
TARGET_SPINE_SERVER: ${{ secrets.DEV_TARGET_SPINE_SERVER }}
TARGET_SERVICE_SEARCH_SERVER: ${{ secrets.DEV_TARGET_SERVICE_SEARCH_SERVER }}

release_sandbox_code:
needs: [get_issue_number, package_code, get_commit_id]
Expand All @@ -116,24 +97,3 @@ jobs:
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }}
TARGET_SPINE_SERVER: sandbox
TARGET_SERVICE_SEARCH_SERVER: sandbox

release_sandbox_code_old:
needs: [get_issue_number, package_code, get_commit_id]
uses: ./.github/workflows/sam_release_code.yml
with:
STACK_NAME: pr-sandbox-${{needs.get_issue_number.outputs.issue_number}}
ARTIFACT_BUCKET_PREFIX: PR-sandbox-${{needs.get_issue_number.outputs.issue_number}}
TARGET_ENVIRONMENT: dev-pr
ENABLE_MUTUAL_TLS: false
BUILD_ARTIFACT: packaged_sandbox_code_old
TRUSTSTORE_FILE: sandbox-truststore.pem
VERSION_NUMBER: PR-${{ needs.get_issue_number.outputs.issue_number }}
COMMIT_ID: ${{ needs.get_commit_id.outputs.commit_id }}
LOG_LEVEL: DEBUG
LOG_RETENTION_DAYS: 30
DOMAIN_NAME_EXPORT: route53-resources:domain
ZONE_ID_EXPORT: route53-resources:ZoneID
secrets:
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }}
TARGET_SPINE_SERVER: sandbox
TARGET_SERVICE_SEARCH_SERVER: sandbox
155 changes: 0 additions & 155 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,31 +139,6 @@ jobs:
INT_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.INT_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE }}

release_dev_old:
needs: [tag_release, package_code, get_commit_id]
uses: ./.github/workflows/sam_release_code.yml
with:
ARTIFACT_BUCKET_PREFIX: ${{needs.tag_release.outputs.version_tag}}
STACK_NAME: dev-ci
TARGET_ENVIRONMENT: dev
ENABLE_MUTUAL_TLS: true
BUILD_ARTIFACT: packaged_code_old
TRUSTSTORE_FILE: truststore.pem
VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}}
COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}}
LOG_LEVEL: DEBUG
LOG_RETENTION_DAYS: 30
CREATE_INT_RELEASE_NOTES: true
CREATE_PROD_RELEASE_NOTES: true
secrets:
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }}
TARGET_SPINE_SERVER: ${{ secrets.DEV_TARGET_SPINE_SERVER }}
TARGET_SERVICE_SEARCH_SERVER: ${{ secrets.DEV_TARGET_SERVICE_SEARCH_SERVER }}
DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
INT_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.INT_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE }}

release_dev_sandbox:
needs: [tag_release, package_code, get_commit_id]
Expand All @@ -185,27 +160,6 @@ jobs:
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }}
TARGET_SPINE_SERVER: sandbox
TARGET_SERVICE_SEARCH_SERVER: sandbox

release_dev_sandbox_old:
needs: [tag_release, package_code, get_commit_id]
uses: ./.github/workflows/sam_release_code.yml
with:
ARTIFACT_BUCKET_PREFIX: ${{needs.tag_release.outputs.version_tag}}
STACK_NAME: dev-sandbox
TARGET_ENVIRONMENT: dev
ENABLE_MUTUAL_TLS: true
BUILD_ARTIFACT: packaged_sandbox_code_old
TRUSTSTORE_FILE: sandbox-truststore.pem
VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}}
COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}}
LOG_LEVEL: DEBUG
LOG_RETENTION_DAYS: 30
DOMAIN_NAME_EXPORT: route53-resources:domain
ZONE_ID_EXPORT: route53-resources:ZoneID
secrets:
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }}
TARGET_SPINE_SERVER: sandbox
TARGET_SERVICE_SEARCH_SERVER: sandbox

release_ref:
needs: [tag_release, release_dev, release_dev_sandbox, package_code, get_commit_id]
Expand All @@ -226,25 +180,6 @@ jobs:
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.REF_CLOUD_FORMATION_DEPLOY_ROLE }}
TARGET_SPINE_SERVER: ${{ secrets.REF_TARGET_SPINE_SERVER }}
TARGET_SERVICE_SEARCH_SERVER: ${{ secrets.REF_TARGET_SERVICE_SEARCH_SERVER }}

release_ref_old:
needs: [tag_release, release_dev_old, release_dev_sandbox, package_code, get_commit_id]
uses: ./.github/workflows/sam_release_code.yml
with:
ARTIFACT_BUCKET_PREFIX: ${{needs.tag_release.outputs.version_tag}}
STACK_NAME: ref-ci
TARGET_ENVIRONMENT: ref
ENABLE_MUTUAL_TLS: true
BUILD_ARTIFACT: packaged_code_old
TRUSTSTORE_FILE: truststore.pem
VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}}
COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}}
LOG_LEVEL: DEBUG
LOG_RETENTION_DAYS: 30
secrets:
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.REF_CLOUD_FORMATION_DEPLOY_ROLE }}
TARGET_SPINE_SERVER: ${{ secrets.REF_TARGET_SPINE_SERVER }}
TARGET_SERVICE_SEARCH_SERVER: ${{ secrets.REF_TARGET_SERVICE_SEARCH_SERVER }}

release_qa:
needs: [tag_release, release_dev, release_dev_sandbox, package_code, get_commit_id]
Expand All @@ -265,25 +200,6 @@ jobs:
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.QA_CLOUD_FORMATION_DEPLOY_ROLE }}
TARGET_SPINE_SERVER: ${{ secrets.QA_TARGET_SPINE_SERVER }}
TARGET_SERVICE_SEARCH_SERVER: ${{ secrets.QA_TARGET_SERVICE_SEARCH_SERVER }}

release_qa_old:
needs: [tag_release, release_dev_old, release_dev_sandbox, package_code, get_commit_id]
uses: ./.github/workflows/sam_release_code.yml
with:
ARTIFACT_BUCKET_PREFIX: ${{needs.tag_release.outputs.version_tag}}
STACK_NAME: qa-ci
TARGET_ENVIRONMENT: qa
ENABLE_MUTUAL_TLS: true
BUILD_ARTIFACT: packaged_code_old
TRUSTSTORE_FILE: truststore.pem
VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}}
COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}}
LOG_LEVEL: DEBUG
LOG_RETENTION_DAYS: 30
secrets:
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.QA_CLOUD_FORMATION_DEPLOY_ROLE }}
TARGET_SPINE_SERVER: ${{ secrets.QA_TARGET_SPINE_SERVER }}
TARGET_SERVICE_SEARCH_SERVER: ${{ secrets.QA_TARGET_SERVICE_SEARCH_SERVER }}

release_int:
needs: [tag_release, release_qa, package_code, get_commit_id]
Expand All @@ -310,31 +226,6 @@ jobs:
INT_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.INT_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE }}

release_int_old:
needs: [tag_release, release_qa_old, package_code, get_commit_id]
uses: ./.github/workflows/sam_release_code.yml
with:
ARTIFACT_BUCKET_PREFIX: ${{needs.tag_release.outputs.version_tag}}
STACK_NAME: int-ci
TARGET_ENVIRONMENT: int
ENABLE_MUTUAL_TLS: true
BUILD_ARTIFACT: packaged_code_old
TRUSTSTORE_FILE: truststore.pem
VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}}
COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}}
LOG_LEVEL: DEBUG
LOG_RETENTION_DAYS: 30
CREATE_INT_RELEASE_NOTES: true
CREATE_INT_RC_RELEASE_NOTES: true
secrets:
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.INT_CLOUD_FORMATION_DEPLOY_ROLE }}
TARGET_SPINE_SERVER: ${{ secrets.INT_TARGET_SPINE_SERVER }}
TARGET_SERVICE_SEARCH_SERVER: ${{ secrets.INT_TARGET_SERVICE_SEARCH_SERVER }}
DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
INT_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.INT_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE }}

release_sandbox:
needs: [tag_release, release_qa, package_code, get_commit_id]
Expand All @@ -357,27 +248,6 @@ jobs:
TARGET_SPINE_SERVER: sandbox
TARGET_SERVICE_SEARCH_SERVER: sandbox

release_sandbox_old:
needs: [tag_release, release_qa, package_code, get_commit_id]
uses: ./.github/workflows/sam_release_code.yml
with:
ARTIFACT_BUCKET_PREFIX: ${{needs.tag_release.outputs.version_tag}}
STACK_NAME: int-sandbox
TARGET_ENVIRONMENT: int
ENABLE_MUTUAL_TLS: true
BUILD_ARTIFACT: packaged_sandbox_code
TRUSTSTORE_FILE: sandbox-truststore.pem
VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}}
COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}}
LOG_LEVEL: DEBUG
LOG_RETENTION_DAYS: 30
DOMAIN_NAME_EXPORT: route53-resources:domain
ZONE_ID_EXPORT: route53-resources:ZoneID
secrets:
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.INT_CLOUD_FORMATION_DEPLOY_ROLE }}
TARGET_SPINE_SERVER: sandbox
TARGET_SERVICE_SEARCH_SERVER: sandbox

release_prod:
needs: [tag_release, release_int, release_sandbox, package_code, get_commit_id]
uses: ./.github/workflows/sam_release_code.yml
Expand All @@ -403,28 +273,3 @@ jobs:
INT_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.INT_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE }}

release_prod_old:
needs: [tag_release, release_int_old, release_sandbox, package_code, get_commit_id]
uses: ./.github/workflows/sam_release_code.yml
with:
ARTIFACT_BUCKET_PREFIX: ${{needs.tag_release.outputs.version_tag}}
STACK_NAME: prod-ci
TARGET_ENVIRONMENT: prod
ENABLE_MUTUAL_TLS: true
BUILD_ARTIFACT: packaged_code_old
TRUSTSTORE_FILE: truststore.pem
VERSION_NUMBER: ${{needs.tag_release.outputs.version_tag}}
COMMIT_ID: ${{needs.get_commit_id.outputs.commit_id}}
LOG_LEVEL: INFO
LOG_RETENTION_DAYS: 731
MARK_JIRA_RELEASED: true
CREATE_PROD_RELEASE_NOTES: true
secrets:
CLOUD_FORMATION_DEPLOY_ROLE: ${{ secrets.PROD_CLOUD_FORMATION_DEPLOY_ROLE }}
TARGET_SPINE_SERVER: ${{ secrets.PROD_TARGET_SPINE_SERVER }}
TARGET_SERVICE_SEARCH_SERVER: ${{ secrets.PROD_TARGET_SERVICE_SEARCH_SERVER }}
DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
INT_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.INT_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE: ${{ secrets.PROD_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE: ${{ secrets.DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE }}
36 changes: 0 additions & 36 deletions .github/workflows/sam_package_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,6 @@ jobs:
packages/getSecretLayer/lib/get-secrets-layer.zip
SAMtemplates/state_machines/GetMyPrescriptionsStateMachine.asl.json
- shell: bash
name: package code (old stack)
run: |
cp .tool-versions ~/
rm -rf .aws-sam
export PATH=$PATH:$PWD/node_modules/.bin
make sam-build-old
cp Makefile .aws-sam/build/
cp samconfig_package_and_deploy.toml .aws-sam/build/
- uses: actions/upload-artifact@v4
name: upload build artifact (old)
with:
name: packaged_code_old
path: |
.aws-sam/build
packages/getSecretLayer/lib/get-secrets-layer.zip
- shell: bash
name: package sandbox code
run: |
Expand All @@ -103,21 +85,3 @@ jobs:
path: |
.aws-sam/build
packages/getSecretLayer/lib/get-secrets-layer.zip
- shell: bash
name: package sandbox code (old)
run: |
cp .tool-versions ~/
rm -rf .aws-sam
export PATH=$PATH:$PWD/node_modules/.bin
make sam-build-sandbox
cp Makefile .aws-sam/build/
cp samconfig_package_and_deploy.toml .aws-sam/build/
- uses: actions/upload-artifact@v4
name: upload sandbox build artifact (old)
with:
name: packaged_sandbox_code_old
path: |
.aws-sam/build
packages/getSecretLayer/lib/get-secrets-layer.zip
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ install-hooks: install-python
sam-build: sam-validate compile download-get-secrets-layer
sam build --template-file SAMtemplates/main_template.yaml --region eu-west-2

#to be removed
sam-build-old: sam-validate compile download-get-secrets-layer
sam build --template-file SAMtemplates/main_template.old.yaml --region eu-west-2

sam-build-sandbox: sam-validate-sandbox compile download-get-secrets-layer
sam build --template-file SAMtemplates/sandbox_template.yaml --region eu-west-2

Expand Down Expand Up @@ -69,8 +65,6 @@ sam-list-outputs: guard-AWS_DEFAULT_PROFILE guard-stack_name
sam list stack-outputs --stack-name $$stack_name

sam-validate:
sam validate --template-file SAMtemplates/main_template.old.yaml --region eu-west-2
sam validate --template-file SAMtemplates/lambda_resources.old.yaml --region eu-west-2
sam validate --template-file SAMtemplates/main_template.yaml --region eu-west-2
sam validate --template-file SAMtemplates/apis/main.yaml --region eu-west-2
sam validate --template-file SAMtemplates/apis/api_resources.yaml --region eu-west-2
Expand Down
Loading

0 comments on commit 0ae6548

Please sign in to comment.