Skip to content

Commit

Permalink
Merge pull request #3148 from opengovsg/release-5.37.0
Browse files Browse the repository at this point in the history
build: Release 5.37.0
  • Loading branch information
tshuli authored Dec 7, 2021
2 parents 7cab172 + fc45c59 commit e6eec29
Show file tree
Hide file tree
Showing 32 changed files with 683 additions and 481 deletions.
6 changes: 2 additions & 4 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ pull_request_rules:
conditions:
- author=dependabot[bot]
- title~=bump [^\s]+ from ([\d]+)\..+ to \1\.
- check-success~=install
- check-success~=build
- check-success~=test-frontend
- check-success~=test-backend
- check-success~=test-e2e
- check-success~=Analyze # CodeQL / Analyze
- check-success~=CodeQL # CodeQL code scanning results
- check-success~=GitGuardian
- check-success~=Semantic Pull Request
- check-success~=Travis CI - Branch
- check-success~=coverage/coveralls
- check-success~=license/snyk
- check-success~=security/snyk
Expand All @@ -24,15 +23,14 @@ pull_request_rules:
conditions:
- author=snyk-bot
- title~=\[Snyk\] Security upgrade [^\s]+ from ([\d]+)\..+ to \1\.
- check-success~=install
- check-success~=build
- check-success~=test-frontend
- check-success~=test-backend
- check-success~=test-e2e
- check-success~=Analyze # CodeQL / Analyze
- check-success~=CodeQL # CodeQL code scanning results
- check-success~=GitGuardian
- check-success~=Semantic Pull Request
- check-success~=Travis CI - Branch
- check-success~=coverage/coveralls
- check-success~=license/snyk
- check-success~=security/snyk
Expand Down
18 changes: 18 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Always validate the PR title, and ignore the commits
# since we only squash commits
titleOnly: true

types:
- feat
- fix
- docs
- style
- refactor
# alias of refactor
- ref
- perf
- test
- build
- ci
- chore
- revert
47 changes: 40 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
jobs:
install:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
Expand All @@ -25,11 +24,47 @@ jobs:
${{ runner.OS }}-node-
${{ runner.OS }}-
- run: npm ci

test-e2e:
lint:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Load Node.js modules
uses: actions/cache@v2
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run lint-ci

build:
needs: lint
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max-old-space-size=4096'
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Load Node.js modules
uses: actions/cache@v2
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run build

test-e2e:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
Expand All @@ -46,9 +81,8 @@ jobs:
- run: npm run test-e2e

test-frontend:
needs: install
needs: lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
Expand All @@ -65,9 +99,8 @@ jobs:
- run: npm run test-frontend

test-backend:
needs: install
needs: lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/deploy-eb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Deploy to AWS Elastic Beanstalk
on:
push:
branches: # There should be 4 environments in github actions secrets: release, staging, staging-alt, uat. This is different from the DEPLOY_ENV secret which corresponds to elastic beanstalk environment name
- release
- staging
- staging-alt
- uat

jobs:
set_environment:
outputs:
current_env: ${{ steps.set-environment.outputs.current_env }}
runs-on: ubuntu-latest
steps:
- id: set-environment
run: echo "::set-output name=current_env::${{github.ref_name}}"

build_deploy_application:
needs: set_environment
environment:
name: ${{ needs.set_environment.outputs.current_env }}
env:
IMAGE_TAG: github-actions-${{ github.sha }}-${{ github.run_id }}-${{github.run_attempt}}
BRANCH: ${{ needs.set_environment.outputs.current_env }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'npm'
- name: Build
env:
NODE_OPTIONS: '--max-old-space-size=4096'
run: |
npm ci
set -e
npm_config_mode=yes npx lockfile-lint --type npm --path package.json --validate-https --allowed-hosts npm
npm run lint-ci
npm run build
- 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: ${{ secrets.AWS_DEFAULT_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build, tag, and push image to Amazon ECR
env:
ECR_REPOSITORY: ${{ secrets.ECR_REPO }}
run: |
docker build -f Dockerfile.production -t $ECR_REPOSITORY:$IMAGE_TAG .
docker tag $ECR_REPOSITORY:$IMAGE_TAG $ECR_REPOSITORY:$BRANCH
docker push -a $ECR_REPOSITORY
sed -i -e "s/@TAG/$IMAGE_TAG/g" Dockerrun.aws.json
zip -r "$IMAGE_TAG.zip" .ebextensions Dockerrun.aws.json
- name: Copy to S3
env:
BUCKET_NAME: ${{ secrets.BUCKET_NAME }}
run: |
aws s3 cp $IMAGE_TAG.zip s3://$BUCKET_NAME/$IMAGE_TAG.zip
- name: Create application version
env:
BUCKET_NAME: ${{ secrets.BUCKET_NAME }}
APP_NAME: ${{ secrets.APP_NAME }}
run: |
aws elasticbeanstalk create-application-version --application-name $APP_NAME \
--version-label $IMAGE_TAG \
--source-bundle S3Bucket=$BUCKET_NAME,S3Key=$IMAGE_TAG.zip \
--description "${{ github.event.head_commit.message }}"
- name: Update EB environment
id: update-eb-1
env:
APP_NAME: ${{ secrets.APP_NAME }}
DEPLOY_ENV: ${{ secrets.DEPLOY_ENV }}
run: |
aws elasticbeanstalk update-environment --application-name $APP_NAME \
--environment-name $DEPLOY_ENV \
--version-label $IMAGE_TAG
123 changes: 0 additions & 123 deletions .travis.yml

This file was deleted.

37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,44 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v5.37.0](https://github.com/opengovsg/FormSG/compare/v5.36.0...v5.37.0)

- feat: Add twilio webhook endpoint for failed SMS deliveries [`#3110`](https://github.com/opengovsg/FormSG/pull/3110)
- chore(ci): add lint and build stages to GA CI, update mergify CI [`#3144`](https://github.com/opengovsg/FormSG/pull/3144)
- chore(deps-dev): bump prettier from 2.5.0 to 2.5.1 [`#3142`](https://github.com/opengovsg/FormSG/pull/3142)
- chore(deps-dev): bump @types/node from 14.17.34 to 14.18.0 [`#3141`](https://github.com/opengovsg/FormSG/pull/3141)
- fix(deps): bump aws-sdk from 2.1041.0 to 2.1043.0 [`#3140`](https://github.com/opengovsg/FormSG/pull/3140)
- fix(deps): bump libphonenumber-js from 1.9.43 to 1.9.44 [`#3143`](https://github.com/opengovsg/FormSG/pull/3143)
- fix(deps): bump aws-sdk from 2.1040.0 to 2.1041.0 [`#3137`](https://github.com/opengovsg/FormSG/pull/3137)
- fix(deps): bump twilio from 3.71.2 to 3.71.3 [`#3138`](https://github.com/opengovsg/FormSG/pull/3138)
- build: Release 5.36.0 [`#3090`](https://github.com/opengovsg/FormSG/pull/3090)
- chore: bump version to 5.36.0 [`2701022`](https://github.com/opengovsg/FormSG/commit/27010229fce32bd6a45c54cd91169766324693d7)

#### [v5.36.0](https://github.com/opengovsg/FormSG/compare/v5.35.0...v5.36.0)

> 2 December 2021
- feat: migrate CI pipeline to github actions [`#3120`](https://github.com/opengovsg/FormSG/pull/3120)
- fix(deps): bump aws-sdk from 2.1039.0 to 2.1040.0 [`#3123`](https://github.com/opengovsg/FormSG/pull/3123)
- chore(deps-dev): bump type-fest from 2.6.0 to 2.8.0 [`#3122`](https://github.com/opengovsg/FormSG/pull/3122)
- fix(deps): bump angular-ui-router from 1.0.29 to 1.0.30 [`#3121`](https://github.com/opengovsg/FormSG/pull/3121)
- docs: update README.md to bring webhooks out of beta [`#3108`](https://github.com/opengovsg/FormSG/pull/3108)
- chore(ci): add semantic.yml to modify CI behaviour [`#3109`](https://github.com/opengovsg/FormSG/pull/3109)
- fix(deps): bump aws-sdk from 2.1037.0 to 2.1039.0 [`#3118`](https://github.com/opengovsg/FormSG/pull/3118)
- fix(deps): bump date-fns from 2.26.0 to 2.27.0 [`#3117`](https://github.com/opengovsg/FormSG/pull/3117)
- chore(deps-dev): bump core-js from 3.19.1 to 3.19.2 [`#3115`](https://github.com/opengovsg/FormSG/pull/3115)
- chore(deps-dev): bump jest-extended from 1.1.0 to 1.2.0 [`#3114`](https://github.com/opengovsg/FormSG/pull/3114)
- chore(deps-dev): bump htmlhint from 0.16.3 to 1.0.0 [`#3105`](https://github.com/opengovsg/FormSG/pull/3105)
- fix(deps): bump aws-sdk from 2.1036.0 to 2.1037.0 [`#3106`](https://github.com/opengovsg/FormSG/pull/3106)
- fix(deps): bump nodemailer from 6.7.1 to 6.7.2 [`#3104`](https://github.com/opengovsg/FormSG/pull/3104)
- chore(deps-dev): bump prettier from 2.4.1 to 2.5.0 [`#3102`](https://github.com/opengovsg/FormSG/pull/3102)
- fix(deps): bump aws-sdk from 2.1035.0 to 2.1036.0 [`#3101`](https://github.com/opengovsg/FormSG/pull/3101)
- fix(deps): bump aws-sdk from 2.1034.0 to 2.1035.0 [`#3097`](https://github.com/opengovsg/FormSG/pull/3097)
- chore(deps-dev): bump htmlhint from 0.16.1 to 0.16.3 [`#3098`](https://github.com/opengovsg/FormSG/pull/3098)
- fix(deps): bump aws-sdk from 2.1033.0 to 2.1034.0 [`#3096`](https://github.com/opengovsg/FormSG/pull/3096)
- chore(deps-dev): bump eslint-plugin-jest from 25.2.4 to 25.3.0 [`#3095`](https://github.com/opengovsg/FormSG/pull/3095)
- chore(deps-dev): bump type-fest from 2.5.4 to 2.6.0 [`#3094`](https://github.com/opengovsg/FormSG/pull/3094)
- chore(deps-dev): bump lint-staged from 12.1.1 to 12.1.2 [`#3089`](https://github.com/opengovsg/FormSG/pull/3089)
- chore: merge release v5.35.0 back to develop [`#3057`](https://github.com/opengovsg/FormSG/pull/3057)
- chore(deps-dev): bump csv-parse from 5.0.2 to 5.0.3 [`#3085`](https://github.com/opengovsg/FormSG/pull/3085)
- fix(deps): bump date-fns from 2.25.0 to 2.26.0 [`#3084`](https://github.com/opengovsg/FormSG/pull/3084)
Expand Down Expand Up @@ -37,6 +73,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- chore(deps-dev): bump type-fest from 2.5.2 to 2.5.4 [`#3059`](https://github.com/opengovsg/FormSG/pull/3059)
- fix(deps): bump bson-ext from 2.0.5 to 2.0.6 [`#3058`](https://github.com/opengovsg/FormSG/pull/3058)
- build: release v5.35.0 [`#3056`](https://github.com/opengovsg/FormSG/pull/3056)
- chore: bump version to 5.36.0 [`574c1e4`](https://github.com/opengovsg/FormSG/commit/574c1e4955aaf01f5914eae7db3a0005677e46b3)

#### [v5.35.0](https://github.com/opengovsg/FormSG/compare/v5.34.0...v5.35.0)

Expand Down
Loading

0 comments on commit e6eec29

Please sign in to comment.