-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
157 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
types: | ||
- closed | ||
|
||
name: Cleanup Feature Branch Infrastructure | ||
jobs: | ||
destroy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '18.x' | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-2 | ||
- name: Cleanup Feature Branch Infrastructure | ||
run: | | ||
cd cdk-infra/ | ||
npm ci | ||
npm run cdk destroy -- -c customFeatureName=enhancedApp-stg-${{github.head_ref}} --force \ | ||
auto-builder-stack-enhancedApp-stg-${{github.head_ref}}-worker \ | ||
auto-builder-stack-enhancedApp-stg-${{github.head_ref}}-queues \ | ||
auto-builder-stack-enhancedApp-stg-${{github.head_ref}}-webhooks |
This file contains 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
types: | ||
- opened | ||
- reopened | ||
|
||
name: Initial Feature Branch Deploy | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '18.x' | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-2 | ||
- name: Deploy Feature Branch Infrastructure | ||
run: | | ||
npm ci | ||
cd cdk-infra/ | ||
npm ci | ||
npm run deploy:feature -- -c env=stg -c customFeatureName=enhancedApp-stg-${{github.head_ref}} --outputs-file outputs.json | ||
- name: Display resource URLs | ||
run: cat cdk-infra/outputs.json |
This file contains 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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
types: | ||
- synchronize | ||
|
||
concurrency: | ||
group: environment-stg-feature-${{ github.ref }} | ||
cancel-in-progress: true | ||
name: Update Feature Branch Infrastructure | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '18.x' | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-2 | ||
|
||
- uses: actions/checkout@v2 | ||
- uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
filters: | | ||
webhooks: | ||
- 'api/v2/**' | ||
- 'cdk-infra/lib/constructs/api/**' | ||
- 'cdk-infra/utils/**' | ||
worker: | ||
- 'src/**' | ||
- 'cdk-infra/lib/constructs/worker/**' | ||
- 'Dockerfile.enhanced' | ||
- 'modules/**' | ||
- name: Update Webhook Stack | ||
if: steps.filter.outputs.webhooks == 'true' | ||
run: | | ||
npm ci | ||
cd cdk-infra/ | ||
npm ci | ||
npm run deploy:feature:stack -- -c env=stg -c customFeatureName=enhancedApp-stg-${{github.head_ref}} \ | ||
auto-builder-stack-enhancedApp-stg-${{github.head_ref}}-webhook | ||
- name: Update Worker Stack | ||
if: steps.filter.outputs.worker == 'true' | ||
run: | | ||
npm ci | ||
cd cdk-infra/ | ||
npm ci | ||
npm run deploy:feature:stack -- -c env=stg -c customFeatureName=enhancedApp-stg-${{github.head_ref}} \ | ||
auto-builder-stack-enhancedApp-stg-${{github.head_ref}}-worker |
This file contains 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 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 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 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 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