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 1.77 #2252

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4f6edab
Merge pull request #2182 from opengovsg/release-1.74
halfwhole Mar 22, 2023
3d99072
build: update ubuntu to 22 in integration tests
halfwhole Apr 10, 2023
308b021
Merge pull request #2196 from opengovsg/build/update-ubuntu-integrati…
halfwhole Apr 12, 2023
b22f4cf
feat: add env var to configure announcement modal button text (#2195)
halfwhole Apr 12, 2023
e2529c5
feat: announcement modal image for memos (#2198)
halfwhole Apr 13, 2023
8e8c2a3
feat: add verify Message button to headers (#2199)
thanhdatle Apr 13, 2023
d1f6114
chore: redirect user to existing link in directory (#2181)
disKeith Apr 13, 2023
347abfa
1.75.0
halfwhole Apr 13, 2023
be9f37c
Merge pull request #2201 from opengovsg/release-1.75
halfwhole Apr 14, 2023
988531c
fix: package.json & package-lock.json to reduce vulnerabilities (#2207)
snyk-bot Apr 24, 2023
b3045c5
feat: allow zip files and block password-protected files (#2203)
halfwhole May 29, 2023
1c527c3
feat: admin api v1 - create url (#2213)
disKeith May 29, 2023
489dc64
1.76.0
disKeith May 29, 2023
31cc4d6
Merge pull request #2221 from opengovsg/release-1.76.0
disKeith May 30, 2023
f60e62c
build: bump alpine to 3.18 in Dockerfile (#2234)
halfwhole Jul 12, 2023
1918500
build(deps): bump dd-trace from 2.11.0 to 2.30.1 (#2236)
halfwhole Jul 12, 2023
1f1ef5f
build(deps): bump dottie from 2.0.2 to 2.0.4 (#2227)
dependabot[bot] Jul 12, 2023
752e4b3
fix: validate email before passing through glob expression (#2232)
halfwhole Jul 12, 2023
7038820
build(deps): bump @sentry/cli from 1.67.2 to 1.75.2 (#2231)
halfwhole Jul 12, 2023
93d81b7
build(deps): bump react-vis from 1.11.7 to 1.11.8 (#2238)
halfwhole Jul 13, 2023
5edeebd
build(deps): bump semver from 7.3.8 to 7.5.4 (#2239)
halfwhole Jul 13, 2023
99e26e9
1.76.1
halfwhole Jul 13, 2023
c2aff06
Merge pull request #2241 from opengovsg/release-1.76.1
halfwhole Jul 13, 2023
90479be
Experiment go <> sgid integration (#2247)
PikkaPikkachu Aug 3, 2023
6b3e5df
1.77.0
PikkaPikkachu Aug 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
- run: npm run test:e2e-headless
integration:
name: Integration Tests
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js
Expand Down
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,48 @@ 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.77.0](https://github.com/opengovsg/GoGovSG/compare/v1.76.1...v1.77.0)

- Experiment go &lt;&gt; 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)
- fix: validate email before passing through glob expression [`#2232`](https://github.com/opengovsg/GoGovSG/pull/2232)
- build(deps): bump dottie from 2.0.2 to 2.0.4 [`#2227`](https://github.com/opengovsg/GoGovSG/pull/2227)
- build(deps): bump dd-trace from 2.11.0 to 2.30.1 [`#2236`](https://github.com/opengovsg/GoGovSG/pull/2236)
- build: bump alpine to 3.18 in Dockerfile [`#2234`](https://github.com/opengovsg/GoGovSG/pull/2234)
- [develop] 1.76.0 [`#2221`](https://github.com/opengovsg/GoGovSG/pull/2221)

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

> 29 May 2023

- feat: admin api v1 - create url [`#2213`](https://github.com/opengovsg/GoGovSG/pull/2213)
- feat: allow zip files and block password-protected files [`#2203`](https://github.com/opengovsg/GoGovSG/pull/2203)
- fix: package.json & package-lock.json to reduce vulnerabilities [`#2207`](https://github.com/opengovsg/GoGovSG/pull/2207)
- [develop] 1.75.0 [`#2201`](https://github.com/opengovsg/GoGovSG/pull/2201)

#### [v1.75.0](https://github.com/opengovsg/GoGovSG/compare/v1.74.0...v1.75.0)

> 13 April 2023

- chore: redirect user to existing link in directory [`#2181`](https://github.com/opengovsg/GoGovSG/pull/2181)
- feat: add verify Message button to headers [`#2199`](https://github.com/opengovsg/GoGovSG/pull/2199)
- feat: announcement modal image for memos [`#2198`](https://github.com/opengovsg/GoGovSG/pull/2198)
- feat: add env var to configure announcement modal button text [`#2195`](https://github.com/opengovsg/GoGovSG/pull/2195)
- build: update ubuntu to 22 in integration tests [`#2196`](https://github.com/opengovsg/GoGovSG/pull/2196)
- [develop] 1.74.0 [`#2182`](https://github.com/opengovsg/GoGovSG/pull/2182)

#### [v1.74.0](https://github.com/opengovsg/GoGovSG/compare/v1.73.0...v1.74.0)

> 17 March 2023

- chore: fix error messages [`#2185`](https://github.com/opengovsg/GoGovSG/pull/2185)
- [Test] increase e2e test confidence [`#2165`](https://github.com/opengovsg/GoGovSG/pull/2165)
- feat(link-transfer): add request ownership button to directory table [`#2179`](https://github.com/opengovsg/GoGovSG/pull/2179)
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine3.16
FROM node:16-alpine3.18

LABEL maintainer="Open Government Products" email="[email protected]"

Expand All @@ -20,10 +20,10 @@ EXPOSE 8080
# For dev webpack server only, proxies to localhost:8080
EXPOSE 3000

RUN apk update && apk add ttf-freefont && rm -rf /var/cache/apk/*
RUN apk update && apk add font-freefont && rm -rf /var/cache/apk/*

# Installs IBMPlexSans-Regular.ttf for QRCodeService.
RUN wget https://github.com/IBM/plex/blob/master/IBM-Plex-Sans/fonts/complete/ttf/IBMPlexSans-Regular.ttf?raw=true -O /usr/share/fonts/TTF/IBMPlexSans-Regular.ttf
# Installs IBMPlexSans-Regular.otf for QRCodeService.
RUN wget https://github.com/IBM/plex/blob/master/IBM-Plex-Sans/fonts/complete/otf/IBMPlexSans-Regular.otf?raw=true -O /usr/share/fonts/freefont/IBMPlexSans-Regular.otf
RUN fc-cache -f

# Install libraries
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=amd64 node:16-alpine3.16
FROM --platform=amd64 node:16-alpine3.18

LABEL maintainer="Open Government Products" email="[email protected]"

Expand All @@ -10,10 +10,10 @@ EXPOSE 8080
# For dev webpack server only, proxies to localhost:8080
EXPOSE 3000

RUN apk update && apk add ttf-freefont && rm -rf /var/cache/apk/*
RUN apk update && apk add font-freefont && rm -rf /var/cache/apk/*

# Installs IBMPlexSans-Regular.ttf for QRCodeService.
RUN wget https://github.com/IBM/plex/blob/master/IBM-Plex-Sans/fonts/complete/ttf/IBMPlexSans-Regular.ttf?raw=true -O /usr/share/fonts/TTF/IBMPlexSans-Regular.ttf
# Installs IBMPlexSans-Regular.otf for QRCodeService.
RUN wget https://github.com/IBM/plex/blob/master/IBM-Plex-Sans/fonts/complete/otf/IBMPlexSans-Regular.otf?raw=true -O /usr/share/fonts/freefont/IBMPlexSans-Regular.otf
RUN fc-cache -f

# Install libraries
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"
}
]
}
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ After these have been set up, set the environment variables according to the tab
|ANNOUNCEMENT_MESSAGE|No|The message in the announcement displayed as a modal to users on login|
|ANNOUNCEMENT_TITLE|No|The title in the announcement displayed as a modal to users on login|
|ANNOUNCEMENT_SUBTITLE|No|The subtitle in the announcement displayed as a modal to users on login|
|ROTATED_LINKS|No|List of comma separated path of links to rotate on the landing page|
|ANNOUNCEMENT_URL|No|The hyperlink for the button in the announcement displayed as a modal to users on login|
|ANNOUNCEMENT_IMAGE|No|The image in the announcement displayed as a modal to users on login|
|ANNOUNCEMENT_BUTTON_TEXT|No|The text on the button in the announcement displayed as a modal to users on login|
|ROTATED_LINKS|No|List of comma separated path of links to rotate on the landing page|
|CSP_REPORT_URI|No|A URI to report CSP violations to.|
|CSP_ONLY_REPORT_VIOLATIONS|No|Only report CSP violations, do not enforce.|
|CLOUDMERSIVE_KEY|No|API key for access to Cloudmersive.|
Expand All @@ -143,8 +144,8 @@ After these have been set up, set the environment variables according to the tab
|JOB_POLL_ATTEMPTS|No|Number of attempts for long polling of job status before timeout of 408 is returned. Defaults to 12|
|JOB_POLL_INTERVAL|No|Interval of time between attempts for long polling of job status in ms. Defaults to 5000ms (5s)|
|API_LINK_RANDOM_STR_LENGTH|No|String length of randomly generated shortUrl in API created links. Defaults to 8|
|FF_EXTERNAL_API|No|Boolean, feature flag for enabling the external API. Defaults to false|
|ADMIN_API_EMAIL|No|Email with admin API access. Defaults to none.|
|FF_EXTERNAL_API|No|Boolean, feature flag for enabling the external and admin API. Defaults to false|
|ADMIN_API_EMAILS|No|Emails with admin API access, separated by commas without spaces. Defaults to none.|

#### Serverless functions for link migration

Expand Down
5 changes: 4 additions & 1 deletion 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 All @@ -38,6 +40,7 @@ services:
- ANNOUNCEMENT_SUBTITLE=Search all go.gov.sg links
- ANNOUNCEMENT_URL=https://go.gov.sg/
- ANNOUNCEMENT_IMAGE=/assets/gov/transition-page/images/directory-browser.svg
- ANNOUNCEMENT_BUTTON_TEXT=Try me now
- AWS_S3_BUCKET=local-bucket
- ROTATED_LINKS=whatsapp,passport,spsc,sppr
- AWS_ACCESS_KEY_ID=foobar
Expand All @@ -64,7 +67,7 @@ services:
- API_LINK_RANDOM_STR_LENGTH=8
- API_KEY_SALT=$$2b$$10$$9rBKuE4Gb5ravnvP4xjoPu
- FF_EXTERNAL_API=true
- ADMIN_API_EMAIL
- [email protected]
volumes:
- ./public:/usr/src/gogovsg/public
- ./src:/usr/src/gogovsg/src
Expand Down
Loading
Loading