-
Notifications
You must be signed in to change notification settings - Fork 2
Chore: [AEA-6520] - Adopt CDK deployment #2549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tstephen-nhs
wants to merge
9
commits into
main
Choose a base branch
from
aea-6257-add-cdk-to-ci-release
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8b7b14e
ops: migrate ci and release workflows to CDK
tstephen-nhs f866515
ops: remove tmp workflow dispatch
tstephen-nhs dbc0662
chore: correct APIGEE name, use const api name
tstephen-nhs 00abd3a
ops: delete old pr stacks, latest common workflows
tstephen-nhs f6cc8d3
chore: npm audit fix
tstephen-nhs 5dae82c
chore: rm trivy.yaml
tstephen-nhs e972519
chore: zizmor
tstephen-nhs 5a9e0ae
ops: delete old proxygen
tstephen-nhs a349685
chore: zizmor
tstephen-nhs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,72 +1,88 @@ | ||
| name: "Delete old cloudformation stacks" | ||
| name: "Delete old pull request deployments" | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| branch_name: | ||
| description: "Branch to run against, defaults to main" | ||
| required: false | ||
| default: "main" | ||
| schedule: | ||
| - cron: "0 0,12 * * *" | ||
| push: | ||
| branches: [main] | ||
| permissions: {} | ||
|
|
||
| permissions: {} | ||
| jobs: | ||
| get_config_values: | ||
| uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@889349f9d93e4846a642f7973b7c26b180bec5aa | ||
| with: | ||
| verify_published_from_main_image: false | ||
| permissions: | ||
| attestations: read | ||
| contents: read | ||
| packages: read | ||
| delete-old-cloudformation-stacks: | ||
| needs: [get_config_values] | ||
| runs-on: ubuntu-22.04 | ||
| permissions: | ||
| container: | ||
| image: ${{ needs.get_config_values.outputs.pinned_image }} | ||
| options: --user 1001:1001 --group-add 128 | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| permissions: &common_permissions | ||
| id-token: write | ||
| contents: read | ||
| packages: read | ||
|
|
||
| steps: | ||
| - name: Checkout local github scripts | ||
| - name: copy .tool-versions | ||
| run: | | ||
| cp /home/vscode/.tool-versions "$HOME/.tool-versions" | ||
| - &checkout | ||
| name: Checkout local github scripts | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | ||
| with: | ||
| ref: ${{ github.event.inputs.branch_name || github.ref_name }} | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| sparse-checkout: | | ||
| .github/scripts | ||
| - &install_dependencies | ||
| name: install dependencies | ||
| uses: ./.github/actions/install_dependencies | ||
| with: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Configure AWS Credentials | ||
| uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 | ||
| with: | ||
| aws-region: eu-west-2 | ||
| role-to-assume: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }} | ||
| role-session-name: aws-pfp-delete-old-stacks | ||
|
|
||
| - name: delete stacks | ||
| shell: bash | ||
| working-directory: .github/scripts | ||
| run: ./delete_stacks.sh | ||
| run: npm run delete-old-pr-stacks --workspace packages/cdk | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| delete-old-proxygen-deployments: | ||
| needs: [get_config_values] | ||
| runs-on: ubuntu-22.04 | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| container: | ||
| image: ${{ needs.get_config_values.outputs.pinned_image }} | ||
| options: --user 1001:1001 --group-add 128 | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| permissions: *common_permissions | ||
|
|
||
| steps: | ||
| - name: Checkout local code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | ||
| with: | ||
| ref: ${{ github.event.inputs.branch_name || github.ref_name }} | ||
| persist-credentials: false | ||
| fetch-depth: 0 | ||
| - name: copy .tool-versions | ||
| run: | | ||
| cp /home/vscode/.tool-versions "$HOME/.tool-versions" | ||
| - *checkout | ||
| - *install_dependencies | ||
|
|
||
| - name: Configure AWS Credentials | ||
| uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 | ||
| with: | ||
| aws-region: eu-west-2 | ||
| role-to-assume: ${{ secrets.PROXYGEN_PTL_ROLE }} | ||
| role-session-name: pfp-delete-old-proxygen | ||
|
|
||
| - name: delete proxygen deployments | ||
| shell: bash | ||
| working-directory: .github/scripts | ||
| run: ./delete_proxygen_deployments.sh | ||
| run: npm run delete-old-pr-deployments --workspace packages/specification | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.