Skip to content
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

[master] Release 1.78.2 #2302

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 41 additions & 0 deletions .ebextensions/25-load-sgid-env.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# loads SGID environment variables to a .env file from SSM

commands:
01-create-env:
command: "/tmp/create-env.sh"

files:
"/tmp/create-env.sh":
mode: "000755"
content : |
#!/bin/bash
ENV_NAME=$(/opt/elasticbeanstalk/bin/get-config environment -k SSM_PREFIX)

ENV_VARS=("SGID_CLIENT_ID" "SGID_CLIENT_SECRET" "SGID_PRIVATE_KEY")

echo "Set AWS region"
aws configure set default.region ap-southeast-1

TARGET_DIR=/etc/gogovsg

echo "Checking if ${TARGET_DIR} exists..."
if [ ! -d ${TARGET_DIR} ]; then
echo "Creating directory ${TARGET_DIR} ..."
mkdir -p ${TARGET_DIR}
if [ $? -ne 0 ]; then
echo 'ERROR: Directory creation failed!'
exit 1
fi
else
echo "Directory ${TARGET_DIR} already exists!"
fi

echo "Creating config for ${ENV_NAME} in ${AWS_REGION}"

for ENV_VAR in "${ENV_VARS[@]}"; do
echo "Running for this ${ENV_NAME}"
echo "Fetching ${ENV_VAR} from SSM"
VALUE=$(aws ssm get-parameter --name "${ENV_NAME}_${ENV_VAR}" --with-decryption --query "Parameter.Value" --output text)
echo "${ENV_VAR}=${VALUE}" >> $TARGET_DIR/.env
echo "Saved ${ENV_VAR}"
done
31 changes: 17 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand All @@ -55,7 +55,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand All @@ -79,7 +79,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand All @@ -100,7 +100,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -229,10 +229,10 @@ jobs:
if: needs.gatekeep.outputs.proceed == 'true'
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- run: |
echo SERVERLESS_SERVICE=gogovsg >> $GITHUB_ENV;
if [[ $GITHUB_REF == $STAGING_BRANCH ]]; then
Expand Down Expand Up @@ -296,7 +296,8 @@ jobs:
- name: serverless deploy
uses: opengovsg/serverless-github-action@v3.0.0
with:
args: -c "serverless plugin install --name serverless-plugin-include-dependencies && serverless deploy --stage=$BRANCH_ENV --conceal --verbose"
# serverless-plugin-include-dependencies v6 onwards requires node 18
args: -c "serverless plugin install --name serverless-plugin-include-dependencies@5.0.0 && serverless deploy --stage=$BRANCH_ENV --conceal --verbose"
entrypoint: /bin/bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -353,10 +354,10 @@ jobs:
if: needs.gatekeep.outputs.proceed == 'true'
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- run: |
echo SERVERLESS_SERVICE=edu >> $GITHUB_ENV;
if [[ $GITHUB_REF == $STAGING_BRANCH ]]; then
Expand Down Expand Up @@ -422,7 +423,8 @@ jobs:
- name: serverless deploy
uses: opengovsg/serverless-github-action@v3.0.0
with:
args: -c "serverless plugin install --name serverless-plugin-include-dependencies && serverless deploy --stage=$BRANCH_ENV --conceal --verbose"
# serverless-plugin-include-dependencies v6 onwards requires node 18
args: -c "serverless plugin install --name serverless-plugin-include-dependencies@5.0.0 && serverless deploy --stage=$BRANCH_ENV --conceal --verbose"
entrypoint: /bin/bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -479,10 +481,10 @@ jobs:
if: needs.gatekeep.outputs.proceed == 'true'
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- run: |
echo SERVERLESS_SERVICE=health >> $GITHUB_ENV;
if [[ $GITHUB_REF == $STAGING_BRANCH ]]; then
Expand Down Expand Up @@ -548,7 +550,8 @@ jobs:
- name: serverless deploy
uses: opengovsg/serverless-github-action@v3.0.0
with:
args: -c "serverless plugin install --name serverless-plugin-include-dependencies && serverless deploy --stage=$BRANCH_ENV --conceal --verbose"
# serverless-plugin-include-dependencies v6 onwards requires node 18
args: -c "serverless plugin install --name serverless-plugin-include-dependencies@5.0.0 && serverless deploy --stage=$BRANCH_ENV --conceal --verbose"
entrypoint: /bin/bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,53 @@ 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).

#### [v1.78.2](https://github.com/opengovsg/GoGovSG/compare/v1.78.1...v1.78.2)

- Chore/fix user query [`#2299`](https://github.com/opengovsg/GoGovSG/pull/2299)
- [develop] 1.78.1 [`#2298`](https://github.com/opengovsg/GoGovSG/pull/2298)

#### [v1.78.1](https://github.com/opengovsg/GoGovSG/compare/v1.78.0...v1.78.1)

> 19 February 2024

- build(deps): bump webpack-dev-server from 3 to 4 [`#2291`](https://github.com/opengovsg/GoGovSG/pull/2291)
- chore: fix serverless plugin include dependencies to v5 [`#2290`](https://github.com/opengovsg/GoGovSG/pull/2290)
- build(deps): bump node from 16 to 18 [`#2285`](https://github.com/opengovsg/GoGovSG/pull/2285)
- [Develop] 1.78.0 [`#2287`](https://github.com/opengovsg/GoGovSG/pull/2287)

#### [v1.78.0](https://github.com/opengovsg/GoGovSG/compare/v1.77.2...v1.78.0)

> 13 December 2023

- feat: remove verify message button linking to checkwho [`#2284`](https://github.com/opengovsg/GoGovSG/pull/2284)
- [develop] 1.77.2 [`#2279`](https://github.com/opengovsg/GoGovSG/pull/2279)

#### [v1.77.2](https://github.com/opengovsg/GoGovSG/compare/v1.77.1...v1.77.2)

> 2 October 2023

- [Snyk] Security upgrade sharp from 0.30.7 to 0.32.6 [`#2277`](https://github.com/opengovsg/GoGovSG/pull/2277)
- build(deps): bump import-in-the-middle from 1.4.1 to 1.4.2 [`#2259`](https://github.com/opengovsg/GoGovSG/pull/2259)
- [Develop] 1.77.1 [`#2267`](https://github.com/opengovsg/GoGovSG/pull/2267)

#### [v1.77.1](https://github.com/opengovsg/GoGovSG/compare/v1.77.0...v1.77.1)

> 7 September 2023

- fix: stored xss via file upload [`#2258`](https://github.com/opengovsg/GoGovSG/pull/2258)
- Develop 1.77.0 [`#2250`](https://github.com/opengovsg/GoGovSG/pull/2250)

#### [v1.77.0](https://github.com/opengovsg/GoGovSG/compare/v1.76.1...v1.77.0)

> 3 August 2023

- Experiment go <> sgid integration [`#2247`](https://github.com/opengovsg/GoGovSG/pull/2247)
- [develop] 1.76.1 [`#2241`](https://github.com/opengovsg/GoGovSG/pull/2241)

#### [v1.76.1](https://github.com/opengovsg/GoGovSG/compare/v1.76.0...v1.76.1)

> 13 July 2023

- build(deps): bump semver from 7.3.8 to 7.5.4 [`#2239`](https://github.com/opengovsg/GoGovSG/pull/2239)
- build(deps): bump react-vis from 1.11.7 to 1.11.8 [`#2238`](https://github.com/opengovsg/GoGovSG/pull/2238)
- build(deps): bump @sentry/cli from 1.67.2 to 1.75.2 [`#2231`](https://github.com/opengovsg/GoGovSG/pull/2231)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine3.18
FROM node:18-alpine3.18

LABEL maintainer="Open Government Products" email="go@open.gov.sg"

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=amd64 node:16-alpine3.18
FROM --platform=amd64 node:18-alpine3.18

LABEL maintainer="Open Government Products" email="go@open.gov.sg"

Expand Down
6 changes: 6 additions & 0 deletions Dockerrun.aws.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@
{
"ContainerPort": "8080"
}
],
"Volumes": [
{
"HostDirectory": "/etc/gogovsg/.env",
"ContainerDirectory": "/usr/src/gogovsg/.env"
}
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ With GoGovSg, citizens are safe in the knowledge that the links are **official**

## Getting Started

Make sure you have node version `16`, docker-compose version >= `1.23.1` and Docker version >= `18.09.0` installed.
Make sure you have node version `18`, docker-compose version >= `1.23.1` and Docker version >= `18.09.0` installed.

> *For Mac computers with Apple silicon, you will need Rosetta to be installed in order for `docker-compose@v1` to work. You can do so using the following command: `softwareupdate --install-rosetta`.

Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ services:
- REDIS_SAFE_BROWSING_URI=redis://redis:6379/4
- SESSION_SECRET=thiscouldbeanything
- GA_TRACKING_ID=UA-139330318-1
- SGID_API_HOSTNAME=https://api.id.gov.sg

- OG_URL=https://go.gov.sg
- VALID_EMAIL_GLOB_EXPRESSION=*.gov.sg
- COOKIE_MAX_AGE=86400000
Expand Down