-
Notifications
You must be signed in to change notification settings - Fork 5
chore: update deployment workflow to support pull requests and configure AWS credentials #146
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
alukach
wants to merge
6
commits into
main
Choose a base branch
from
refactor/auto-deploy-on-prs
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 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e07c482
chore: update deployment workflow to support pull requests and config…
alukach cad25e3
update template
alukach 2ea693f
Change email (test deployment trigger)
alukach c242cb4
Fix deploy
alukach 1a7eee0
re-add default_account
alukach c086cfc
Merge branch 'main' into refactor/auto-deploy-on-prs
alukach 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
## :warning: Checklist if your PR is changing anything else than documentation | ||
- [ ] Posted the link to a successful manually triggered deployment workflow (successful including the resources destruction) | ||
|
||
## Merge request description |
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 |
---|---|---|
|
@@ -2,18 +2,32 @@ name: Deployment | |
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
paths: | ||
- "lib/**" | ||
- "integration_tests/**" | ||
- "package.json" | ||
- "package-lock.json" | ||
|
||
jobs: | ||
build_package_and_deploy: | ||
name: Build, package and deploy | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 90 | ||
permissions: | ||
id-token: write | ||
contents: read | ||
env: | ||
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION_DEPLOY }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_DEPLOY }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_DEPLOY }} | ||
AWS_ROLE_ARN: ${{ vars.AWS_ROLE_ARN }} | ||
AWS_DEFAULT_ACCOUNT: ${{ secrets.AWS_ACCOUNT_ID }} | ||
AWS_DEFAULT_REGION: 'us-west-2' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We might keep this in |
||
steps: | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ env.AWS_ROLE_ARN }} | ||
aws-region: ${{ env.AWS_DEFAULT_REGION }} | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
|
@@ -30,7 +44,6 @@ jobs: | |
- name: Generate distribution packages | ||
run: npm run package | ||
|
||
|
||
- name: Install deployment environment | ||
id: install_deploy_env | ||
run: | | ||
|
@@ -56,12 +69,7 @@ jobs: | |
PROJECT_ID: ${{ steps.short-sha.outputs.sha }} | ||
run: | | ||
source .deployment_venv/bin/activate | ||
|
||
# synthesize the stack | ||
cd integration_tests/cdk | ||
npx cdk synth --debug --all --require-approval never | ||
|
||
# deploy the stack | ||
npx cdk deploy --ci --all --require-approval never | ||
deactivate | ||
cd - | ||
|
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.
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.