Skip to content

Commit

Permalink
feat(lambda): create lambda for migration of url(s) (#1755)
Browse files Browse the repository at this point in the history
* feat(lambda): add lambda for migration of url to user

* feat(lambda): add lambda for migration of user's links to another user

* refactor(lambda-migrate-url-to-user): remove function overwrite
  • Loading branch information
wanlingt authored Dec 27, 2021
1 parent ca41c57 commit 99d53c8
Show file tree
Hide file tree
Showing 8 changed files with 406 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,16 @@ jobs:
local-image: my-image
image: ${{ env.ECR_REPO }}:${{ steps.extract_tag.outputs.tag }}
deploy:
name: Deploy to Elastic Beanstalk
name: Deploy to Elastic Beanstalk and AWS Lambda
runs-on: ubuntu-18.04
needs: [ci, test, gatekeep, build]
if: needs.gatekeep.outputs.proceed == 'true'
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Package Dockerrun.aws.json
run: |
sed -i -e "s|@REPO|$REPO|g" Dockerrun.aws.json
Expand All @@ -221,6 +225,12 @@ jobs:
env:
TAG: ${{ needs.build.outputs.tag }}
TIMESTAMP: ${{ steps.get_timestamp.outputs.timestamp }}
- run: |
if [[ $GITHUB_REF == $STAGING_BRANCH ]]; then
echo SERVERLESS_STAGE=staging >> $GITHUB_ENV;
elif [[ $GITHUB_REF == $PRODUCTION_BRANCH ]]; then
echo SERVERLESS_STAGE=production >> $GITHUB_ENV;
fi
- name: Select Elastic Beanstalk variables
shell: python
run: |
Expand Down Expand Up @@ -261,6 +271,15 @@ jobs:
deployment_package: deploy.zip
wait_for_deployment: false
wait_for_environment_recovery: false
- name: serverless deploy
uses: opengovsg/serverless-github-action@master
with:
args: -c "serverless plugin install --name serverless-plugin-include-dependencies && serverless deploy --conceal -v"
entrypoint: /bin/bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SERVERLESS_STAGE: ${{ env.SERVERLESS_STAGE }}
build-edu:
name: Build and push for edu
runs-on: ubuntu-18.04
Expand Down
Loading

0 comments on commit 99d53c8

Please sign in to comment.