-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: initial tweaks to build script * feat: moved serverless modules to project root * feat: #2396 update slack bot (#2408) * feat: updated serverless for all go live apps * feat: #2396 deployment scripts (#2414) * feat: #2396 upload tar scripts * feat: #2396 fetch artifact scripts * feat: #2396 deployment scripts * feat: #2396 fix serverless config * chore: add deployment script by serverless * feat: #2396 add remove serverless * feat: small tweak to bucket name Co-authored-by: Pham Hai Duong <[email protected]>
- Loading branch information
Showing
32 changed files
with
591 additions
and
163 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,40 @@ | ||
name: Delete Environment | ||
|
||
on: | ||
repository_dispatch: | ||
types: [delete-environment] | ||
jobs: | ||
delete-environment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checks out repository to $GITHUB_WORKSPACE | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node Environment | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
|
||
- name: Set up workspace experimental | ||
run: | | ||
yarn config set workspaces-experimental true | ||
- name: Install dependencies | ||
run: | | ||
yarn global add [email protected] | ||
yarn add isomorphic-fetch -W | ||
- name: Remove Serverless | ||
run: | | ||
yarn workspace ${{ github.event.client_payload.package_name }} remove:${{ github.event.client_payload.environment }} | ||
env: | ||
AWS_REGION: ${{secrets.AWS_REGION}} | ||
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}} | ||
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}} | ||
RELEASE_SLACK_WEB_HOOK_URL: ${{secrets.RELEASE_SLACK_WEB_HOOK_URL}} | ||
CYPRESS_USERNAME: ${{secrets.CYPRESS_USERNAME}} | ||
CYPRESS_PASSWORD: ${{secrets.CYPRESS_PASSWORD}} | ||
NPM_TOKEN: ${{secrets.NPM_TOKEN}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,14 +26,44 @@ jobs: | |
yarn global add [email protected] | ||
yarn add isomorphic-fetch -W | ||
- name: Configure AWS credentials to production | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_PROD }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_PROD }} | ||
aws-region: ${{secrets.AWS_REGION}} | ||
|
||
- name: Fetch artifact from prod | ||
run: | | ||
yarn fetch-artifact ${{ github.event.client_payload.package_name }} ${{ github.event.client_payload.current_tag }} | ||
- name: Configure AWS credentials by environment | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
if: ${{ github.event.client_payload.environment == 'development' }} | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{secrets.AWS_REGION}} | ||
if: ${{ github.event.client_payload.environment == 'staging' }} | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{secrets.AWS_REGION}} | ||
if: ${{ github.event.client_payload.environment == 'production' }} | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_PROD }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_PROD }} | ||
aws-region: ${{secrets.AWS_REGION}} | ||
|
||
- name: Fetch config | ||
run: | | ||
yarn fetch-config --name ${{ github.event.client_payload.environment }} | ||
- name: Release Production | ||
run: | | ||
yarn release ${{ github.event.client_payload.environment }} ${{ github.event.client_payload.package_name }} ${{ github.event.client_payload.current_tag }} ${{ github.event.client_payload.previous_tag }} | ||
yarn release ${{ github.event.client_payload.environment }} ${{ github.event.client_payload.package_name }} ${{ github.event.client_payload.current_tag }} | ||
env: | ||
AWS_REGION: ${{secrets.AWS_REGION}} | ||
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}} | ||
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}} | ||
RELEASE_SLACK_WEB_HOOK_URL: ${{secrets.RELEASE_SLACK_WEB_HOOK_URL}} | ||
CYPRESS_USERNAME: ${{secrets.CYPRESS_USERNAME}} | ||
CYPRESS_PASSWORD: ${{secrets.CYPRESS_PASSWORD}} | ||
|
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
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
Oops, something went wrong.