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

HAAR-2154: typescript template updates #60

Merged
merged 242 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
242 commits
Select commit Hold shift + click to select a range
2f73e58
Initial commit
andrewrlee Nov 12, 2020
c89f6f8
Alee/init (#1)
andrewrlee Nov 19, 2020
472adbb
Fixing docker image (#2)
andrewrlee Nov 19, 2020
36a57e7
Fix secret name (#3)
andrewrlee Nov 19, 2020
8683f28
Correcting variable names and removing unnecessary ones (#4)
andrewrlee Nov 19, 2020
418349e
Fixing variable name (#5)
andrewrlee Nov 19, 2020
c2af2d4
Removing trailing slashes from env vars (#6)
andrewrlee Nov 19, 2020
49ace58
Fix hostname (#7)
andrewrlee Nov 19, 2020
ccc0c03
Update dependencies (#8)
andrewrlee Dec 7, 2020
ac0dfa6
Reducing docker image size (#9)
andrewrlee Dec 15, 2020
c8a5587
Add rename script (#10)
andrewrlee Dec 18, 2020
1a11c21
Alee/decoupling auth client from redis (#11)
andrewrlee Dec 21, 2020
ec4f5ed
Update to latest hmpps orb version (#12)
mattops Jan 11, 2021
27a10a5
Fixing build-info.json placement (#13)
brightonsbox Jan 12, 2021
1ac0a0c
Convert to arrow functions in utils (#14)
psoleckimoj Jan 26, 2021
b3713ee
Make the use of logger naming consistent (#15)
psoleckimoj Jan 27, 2021
61b41df
Adding outdated job (#16)
andrewrlee Feb 18, 2021
594b004
Updating dependencies (#17)
andrewrlee Mar 5, 2021
a581d49
Moving to enable no-implicit-any (#18)
andrewrlee Mar 5, 2021
db09442
DT-1659: 🔨 Remove helm copying secrets from AWS (#19)
petergphillips Mar 8, 2021
716fdfb
Adding moj design system (#20)
andrewrlee Mar 17, 2021
8a43d6d
Add new veracode scan for schedueled workflow (#21)
mattops Mar 19, 2021
9fefb8f
Removing deprecated body parser (#22)
andrewrlee Mar 25, 2021
e8532ef
DT-1627: 📄 Update license with correct year (#23)
petergphillips May 11, 2021
cf8f8d7
Added missing ping endpoint as used by Kubernetes for liveliness prob…
andymarke May 12, 2021
ea38330
DT-2012 - upgrade hmpps orb, and add veracode policy scan job. (#25)
mattops May 14, 2021
e7df526
Use generic-service and generic-prometheus-alerts charts (#26)
mattops May 18, 2021
a2d85cd
Updating dependencies and adding slack notifications to outdated chec…
andrewrlee May 24, 2021
336b8fa
Moving to group middleware into related modules, following the patter…
andrewrlee May 28, 2021
5f29995
Fix the slack notification on `check_outdated` (#30)
Jun 4, 2021
3ef04f5
Updating node dependencies (#31)
andrewrlee Jun 16, 2021
5e81ee3
Fixing configuration of security audit (#32)
brightonsbox Jun 16, 2021
2003f62
Alee/update dependencies (#33)
andrewrlee Jun 24, 2021
3d93d8e
DT-2166 - add trivy image scanning job (#35)
mattops Jun 28, 2021
96d73dc
Fix trivy scan job slack notifications channel (#36)
mattops Jun 28, 2021
f541d64
Use node executor and parameterise the version (#34)
markreesmoj Jun 28, 2021
0d87899
Deploy template project to template k8s namespace (#37)
mattops Jun 30, 2021
4422c3f
DT-2260 - update to latest circleci orb and chart dependencies (#38)
mattops Jun 30, 2021
bc34e5f
Updating dependencies and improving README (#39)
andrewrlee Jul 1, 2021
e9450ed
DT-2282: ⬆️ Fix veracode policy scan (#40)
petergphillips Jul 6, 2021
7fd93c9
Moving cypress tests to typescript (#41)
andrewrlee Jul 27, 2021
264f33f
DT-2404: 💄 Switch to sign in / out instead of login / out (#42)
petergphillips Aug 6, 2021
fb0d2d0
DT-2404: ✅ Run tests automatically on commit (#43)
petergphillips Aug 6, 2021
80eee9d
Update dependencies (#44)
andrewrlee Aug 16, 2021
f41de78
DT-2297 - Veracode - switch to daily pipeline scan (results in circle…
mattops Aug 19, 2021
f5d881e
DT-2297- randomise timing of circleci security workflow due to rate l…
mattops Aug 24, 2021
17a4437
update typescript (#48)
connormaglynn Sep 1, 2021
4a64ef0
Fixing docker caching apt-get layer (#49)
andrewrlee Sep 6, 2021
dd68b5d
Fix docker build failing, and reduce image size (#50)
mattops Sep 7, 2021
94db4f2
Remove use of semi colons before arrays (#51)
garethmdavies Sep 29, 2021
d7d9133
WFP-610 update to npmv7 and fix some audit (#52)
markreesmoj Oct 7, 2021
2115d45
WFP-610 upgrade to jest-junit 13 to bring in new ansi-regex (#54)
markreesmoj Oct 8, 2021
5946417
Upgrading dependencies (#55)
andrewrlee Oct 8, 2021
223e269
FIXBUILD: update ansi-regex subdependency (#56)
markreesmoj Oct 11, 2021
d943820
DT-2702: 🔨 Use new generic service configuration (#57)
petergphillips Oct 11, 2021
349bdb7
Update dependencies (#58)
andrewrlee Oct 14, 2021
aa16d4a
Moving to use HMPPS header (#59)
brightonsbox Oct 20, 2021
cc41f5d
Fix path of unit test results that are uploaded as artifacts (#60)
ushkarev Oct 20, 2021
6ff0d36
DT-2814: 🐛 Fix cron timings for veracode (#61)
petergphillips Nov 3, 2021
a6c72ba
NN-3747 fixing json structure for the stubUserRoles call and populati…
Nov 5, 2021
f247b8a
Bumping node version (#63)
andrewrlee Nov 10, 2021
db9a433
DT-2796: 🔨 Migrate dev to live context (#64)
petergphillips Nov 18, 2021
d94f72c
Update dependencies and move to NPM v8 (#65)
psoleckimoj Dec 7, 2021
dccca36
Upgrading dependencies (#66)
andrewrlee Jan 6, 2022
a192197
Update modules and remove express-request-id (#67)
psoleckimoj Jan 25, 2022
2c530c0
INC-163 Timeout Fix - Correctly sets the timeout for a HttpAgent (#69)
Mjwillis Feb 4, 2022
59a9b65
⬆️ update dependencies and 💄add no-only-tests linting rule for cypres…
connormaglynn Feb 14, 2022
9651352
SDI-60: 🔨 Add global protect and petty france to allowlists (#71)
petergphillips Feb 14, 2022
10ccbe8
Update dependencies (#72)
psoleckimoj Mar 2, 2022
c450787
DCS-1442 jquery-ui.css coep fix (#73)
louisenorris Mar 8, 2022
7d9565b
Fixing docker caching issue (#74)
andrewrlee Mar 18, 2022
fd85c22
Setup prometheus metrics by default. (#75)
Mar 24, 2022
49c6ad6
Bump minimist from 1.2.5 to 1.2.6 (#76)
dependabot[bot] Mar 24, 2022
0354a09
Update dependencies (#77)
andrewrlee Apr 8, 2022
eefd2aa
Audit fix (#79)
andrewrlee Apr 11, 2022
dc3f727
NN-4060: App Insights only works with bunyan v1 (#80)
sp-watson Apr 20, 2022
e2e93b4
Update orb and dependencies (#82)
andrewrlee Apr 22, 2022
8aa16ee
Stop metrics test from hitting a real service and occasionally timing…
jonnywyatt Apr 22, 2022
752a0ec
SDI-181: 🔧 Add jira notifications for new projects (#83)
petergphillips Apr 28, 2022
05dcc72
Adding better redis error handling (#84)
andrewrlee May 3, 2022
3bd1861
SDI-181: 🔧 Use new cimg redis executor (#85)
petergphillips May 4, 2022
968735d
SLM-245 Restore cache prior to running up the app for the integration…
mikehalmamoj May 11, 2022
6676e3a
SDI-88: 🚨 Fix querystring warning (#87)
petergphillips May 12, 2022
0bd862a
SDI-88: 🐛 Fix cookie session down as a dependency (#88)
petergphillips May 13, 2022
73c1b62
SDI-88: ♻️ Tidy up mocks and switch to multiplatform builds (#89)
petergphillips May 13, 2022
0f2559b
Allow async get to take an array of strings for paths like original g…
psoleckimoj May 16, 2022
5e69d1a
SDI-182: ✨ Switch to using connection string instead (#91)
petergphillips May 16, 2022
5d61681
Update README.md (#92)
andrewrlee May 17, 2022
7a08151
SDI-88: ✅ Add token verification integration tests (#94)
petergphillips May 19, 2022
6de4fe3
Minor "code smell" fixes suggested by Sonar Cloud (#95)
ushkarev May 20, 2022
f4d9846
SDI-211: 🔒️ Bump versions to fix security issues and cope with passpo…
petergphillips May 24, 2022
d5d2fbc
Updating dependencies (#97)
andrewrlee May 26, 2022
d961034
SDI-211: 🎨 Enforce trailing comma on functions too (#98)
petergphillips May 30, 2022
992fff1
SDI-211: 🎨 Enforce arrow parens (#99)
petergphillips May 31, 2022
2fa5e70
Bump dependencies (#100)
psoleckimoj Jun 6, 2022
127b2c7
SDI-218: ⬆ Upgrade cypress to v10 (#101)
petergphillips Jun 8, 2022
5249392
⬆️ Update dependencies (#102)
connormaglynn Jun 20, 2022
3c43ed9
Ignore false positive around nodemon (#103)
andrewrlee Jun 23, 2022
3c5a9ba
Updating dependencies (#104)
andrewrlee Jul 5, 2022
616e7ce
Update dependencies (#105)
andrewrlee Jul 8, 2022
a6ac4cb
Create services container (#106)
andrewrlee Jul 8, 2022
a71978d
SDI-265: ♻️ Minor improvements (#107)
petergphillips Jul 11, 2022
9820452
SDI-265: 🚨 Add lint check for only (#108)
petergphillips Jul 12, 2022
d548f47
Update Jest to v28 and minor dependency updates (#109)
psoleckimoj Jul 21, 2022
1a9e219
Remove duplicate <main> elements (#110)
richpjames Jul 28, 2022
338690a
Bumping dependencies and fixing page width (#111)
andrewrlee Aug 11, 2022
26f0b62
Add a `cspNonce` to the webSecurity setup (#112)
pezholio Aug 15, 2022
e2299e3
Update dependencies 2022-08-22 (#113)
psoleckimoj Aug 22, 2022
3dfd162
Update dependencies to fix check outdated flagging typescript (#114)
neilmendum Aug 31, 2022
737b6f6
Update dependencies 2022-09-09 (#115)
psoleckimoj Sep 9, 2022
25b0208
Speeding up jest tests (#116)
andrewrlee Sep 12, 2022
610a227
Removing colour from logs in production mode (#117)
andrewrlee Sep 15, 2022
767c5d9
Move ingress (#118)
psoleckimoj Sep 20, 2022
9ca506c
SDI-345: ⬆️ Upgrade node and cypress (#119)
petergphillips Sep 21, 2022
0a16804
Fixing logging (#120)
andrewrlee Sep 23, 2022
af854b8
Update dependencies 2022-09-28 (#121)
psoleckimoj Sep 28, 2022
2dcae4f
⬆️Upgrade to latest helm chart versions (#122)
connormaglynn Oct 3, 2022
b2a656c
Adding badges (#123)
andrewrlee Oct 7, 2022
c78f1d5
Updating node to v18 (#124)
andrewrlee Oct 26, 2022
65980b1
Set helm timeout to 5 minutes (#125)
carlov20 Oct 27, 2022
f7aad6e
Use official redis image for docker-compose (#126)
neilmendum Nov 1, 2022
b7152f7
Update Helm config to match Kotlin template (#127)
neilmendum Nov 1, 2022
1d1ddb6
Update dependencies 2022-11-15 (#128)
psoleckimoj Nov 15, 2022
de90fee
Update dependencies 2022-11-16 (#129)
psoleckimoj Nov 16, 2022
317fcb2
Update node images (#130)
psoleckimoj Nov 25, 2022
6964e83
SDI-476: ⬆ Bump versions (#131)
petergphillips Dec 7, 2022
4920b06
Update dependencies 2022-12-08 (#132)
psoleckimoj Dec 8, 2022
8633cb0
Update dependencies 2022-12-19 (#133)
psoleckimoj Dec 19, 2022
2e1e3d5
Bump jsonwebtoken from 8.5.1 to 9.0.0 (#136)
dependabot[bot] Dec 23, 2022
3a127d6
Fix conflicting prettier / eslint rule (#135)
pezholio Dec 28, 2022
5386b50
SDI-523: 🔒️ Fix / ignoresecurity issues (#138)
petergphillips Jan 3, 2023
b636741
HEAT-41: use npm outdated job from HMPPS Orb; update other dependenci…
neilmendum Jan 17, 2023
839c8e1
Update dependencies 2023-01-24 (#140)
psoleckimoj Jan 24, 2023
4c975e6
Update dependencies 2023-01-31 (#141)
psoleckimoj Jan 31, 2023
9fc40b0
Update dependencies 2023-02-01 (#142)
psoleckimoj Feb 1, 2023
1f27375
Configure Renovate (#144)
renovate[bot] Feb 2, 2023
14cdec7
Update Helm release generic-service to v2.4.0 (#146)
renovate[bot] Feb 3, 2023
a99053c
Update peter-evans/create-pull-request action to v4 (#148)
renovate[bot] Feb 3, 2023
97b1fa8
Update actions/checkout action to v3 (#147)
renovate[bot] Feb 3, 2023
92b5a33
Add .nvmrc file, Prettier support for Nunjucks and use SCSS (#143)
davidmiddletonmoj Feb 3, 2023
7745886
Revert build_multiplatform_docker because it causes the build to take…
neilmendum Feb 3, 2023
b80efe8
Update dependency cypress to ^12.5.1 (#150)
renovate[bot] Feb 7, 2023
20f2181
HEAT-52: reduce the size of the PR body by specifying prBodyTemplate …
neilmendum Feb 13, 2023
0075fab
Update all non major NPM dependencies (#151)
renovate[bot] Feb 13, 2023
8e5a9d2
Update all non major NPM dependencies (#153)
renovate[bot] Feb 16, 2023
d9c2d14
Update all non major NPM dependencies (#155)
renovate[bot] Feb 24, 2023
941ca4d
Update all non major NPM dependencies (#156)
renovate[bot] Feb 28, 2023
cd997e0
Update all non major NPM dependencies (#159)
renovate[bot] Mar 2, 2023
41a6094
Update Helm release generic-service to v2.5.0 (#161)
renovate[bot] Mar 7, 2023
213008f
Update node image and regenerate package-lock.json (#165)
psoleckimoj Mar 16, 2023
154e107
Update hmpps-orb to v7.2.1 (#166)
garethmdavies Mar 16, 2023
220b506
Upgrade to connect-redis 7 and update other dependencies (#168)
psoleckimoj Mar 20, 2023
2b69d5b
Upgrade to typescript 5 (#169)
psoleckimoj Mar 20, 2023
19be08c
Add HMPPS Auth URL to form-action CSP string (#170)
bryangaledxw Mar 20, 2023
919ecdc
Update TypeScript etc 2023-04-03 (#174)
psoleckimoj Apr 4, 2023
52f8e99
Removing unnecessary build (#172)
andrewrlee Apr 4, 2023
37f8bc0
Update dependencies 2023-04-12 (#177)
psoleckimoj Apr 12, 2023
06ecd8d
SDIT-738: ⚡️ Cache static resources for 1 hour (#178)
petergphillips Apr 13, 2023
b3477b1
Update dependencies 2023-04-21 (#181)
psoleckimoj Apr 21, 2023
757c6ef
Fix security vuln 2023-04-25 (#183)
psoleckimoj Apr 25, 2023
4b75683
Update Helm release generic-service to v2.6.2 (#182)
renovate[bot] Apr 25, 2023
194c154
SDIT-760: 🔧 Upgrade redis to 7 (#186)
petergphillips Apr 27, 2023
c8869d0
Update Helm release generic-service to v2.6.3 (#184)
renovate[bot] May 2, 2023
ea3f137
Tie css cache to version of application (#188)
andrewrlee May 10, 2023
88c301f
Fix version not appearing in application insights (#190)
andrewrlee May 16, 2023
5b7903b
Update Helm release generic-prometheus-alerts to v1.3.2 (#189)
renovate[bot] May 19, 2023
586d966
Add PreProd and Prod helm config (#193)
neilmendum May 19, 2023
f6b3725
Update slack orb to v4.12.5 (#185)
renovate[bot] May 23, 2023
83be369
Update peter-evans/create-pull-request action to v5 (#175)
renovate[bot] May 23, 2023
58512df
Update all non major NPM dependencies (#176)
renovate[bot] Jun 6, 2023
4466ddc
Update Node.js to v18.16 (#191)
renovate[bot] Jun 6, 2023
087bc0e
Update dependencies 2023-06-07 (#196)
psoleckimoj Jun 7, 2023
ded60e6
Do not retry POST requests by default (#197)
andrewrlee Jun 9, 2023
ddf3823
Adding changelog (#198)
andrewrlee Jun 12, 2023
a5dc02d
Have `sanitisedError` always return an Error instance (#199)
ushkarev Jun 12, 2023
eac50e9
Update all non major NPM dependencies (#195)
renovate[bot] Jun 22, 2023
7e907e1
Update all non major NPM dependencies (#200)
renovate[bot] Jul 3, 2023
613628c
Fix semver vuln (#202)
psoleckimoj Jul 4, 2023
2c49560
Update govuk-frontend to 4.7.0 (#205)
psoleckimoj Jul 7, 2023
ee2b55a
Update all non major NPM dependencies (#204)
renovate[bot] Jul 27, 2023
b3e39ed
HEAT-82: Add productId and /info endpoint (#212)
psoleckimoj Aug 3, 2023
71d46bc
Update README with dev portal URL (#213)
psoleckimoj Aug 3, 2023
0ad7d20
Fix info endpoint test description (#214)
psoleckimoj Aug 3, 2023
ce05196
Update CHANGELOG.md (#216)
andrewrlee Aug 10, 2023
8b64d97
Fix linting, update modules, remove override (#219)
psoleckimoj Aug 16, 2023
fc402c2
Move /info to health check block (#220)
psoleckimoj Aug 18, 2023
dd2585c
Update dependencies 2023-09-05 (#226)
psoleckimoj Sep 5, 2023
dda7da0
Fix CircleCI workflows for cypress (#223)
ushkarev Sep 5, 2023
6e9a6f5
Fix cypress config and remove some vestigial code (#228)
ushkarev Sep 5, 2023
a357ce8
Update readme (#229)
psoleckimoj Sep 5, 2023
f2314e1
Update Helm release generic-prometheus-alerts to v1.3.3 (#224)
renovate[bot] Sep 6, 2023
ea81f5b
Update redis Docker tag to v7.2 (#221)
renovate[bot] Sep 6, 2023
8e536a6
Update Node.js to v18.18 (#230)
renovate[bot] Sep 21, 2023
a04c1e7
HEAT-106: Standardise endpoints (#231)
psoleckimoj Sep 22, 2023
57feb88
SDIT-1088: ✨ Get components to always return status even if failed (#…
petergphillips Sep 25, 2023
41227a8
SDIT-1108: 🔧 Don't default build args (#233)
petergphillips Sep 25, 2023
5251e36
SDIT-1108: ♻️ Fix deprecated syntax version of ENV (#234)
petergphillips Sep 25, 2023
9358419
SDIT-1108: ✨ Add in environment name to header (#235)
petergphillips Sep 28, 2023
b1a467a
SDIT-1108: 📝 Add new environment name to changelog (#236)
petergphillips Sep 29, 2023
1d8b294
NON-270: Improve REST client (#238)
ushkarev Oct 4, 2023
dc8cbc6
Update actions/checkout action to v4 (#225)
renovate[bot] Oct 4, 2023
7c9412a
Update all non major NPM dependencies (#210)
renovate[bot] Oct 4, 2023
7345c5a
Update Helm release generic-service to v2.6.5 (#237)
renovate[bot] Oct 4, 2023
9232bdf
Update dependencies 2023-10-17 (#243)
psoleckimoj Oct 17, 2023
8504faf
HAAR-1891: Update deprecated endpoints with new endpoints (#247)
ravmoj Oct 25, 2023
5807b1d
Update renovate.json (#248)
ushkarev Oct 25, 2023
5894228
Move to Node 20 plus minor updates (#249)
psoleckimoj Oct 27, 2023
c8dc656
Update CHANGELOG for node 20 change (#250)
psoleckimoj Oct 27, 2023
24fcc31
Update jwt-decode module to version 4.0.0 (#252)
psoleckimoj Oct 27, 2023
3eb9880
Update CHANGELOG.md (#253)
andrewrlee Oct 27, 2023
5abb3c6
Added changelog for PR #247 (#254)
brightonsbox Oct 27, 2023
65bb15f
Update all non major NPM dependencies (#239)
renovate[bot] Nov 6, 2023
db84e2b
HAAR-1891: Add newly-included Manage Users api to health checks (#255)
ushkarev Nov 7, 2023
f7e7cdf
Migrating project to use groups in allowlist (#257)
andrewrlee Nov 7, 2023
5d99710
SDIT-1223: ✨ Add in role_ prefix if not set by caller (#261)
petergphillips Nov 14, 2023
9806c97
SDIT-1223: ⬆️ Switch to latest wiremock (#262)
petergphillips Nov 14, 2023
18322ad
SDIT-1223: 🎨 Open chrome by default (#263)
petergphillips Nov 14, 2023
2ab7cec
Update all non major NPM dependencies (#259)
renovate[bot] Nov 14, 2023
c6697e6
SDIT-1223: 🎨 Minor cypress improvements (#265)
petergphillips Nov 15, 2023
4c8be83
SDIT-1248: 🔨 Fix pushing JIRA deployment information (#266)
petergphillips Nov 15, 2023
0c9c194
SDIT-1223: 🎨 Improve cypress healthcheck (#267)
petergphillips Nov 15, 2023
d4e25f7
SDIT-1223: 🎨 Rename breadcrumb to be lowercase (#268)
petergphillips Nov 17, 2023
47e9649
Update all non major NPM dependencies (#264)
renovate[bot] Nov 18, 2023
ca2cfee
Update dependencies 2023-11-21 (#272)
psoleckimoj Nov 21, 2023
3949b48
Use in-memory token store when developing locally (#273)
marcus-bcl Nov 29, 2023
b9a9f4b
Remove getUserRoles as an api call and add as decoded from the token …
thomasridd Nov 29, 2023
45eb5e6
Requre user input when excucting rename script to ensure slack alert …
mattops Dec 5, 2023
5eca7a2
fix rename project github workflow, correct inputs key. (#278)
mattops Dec 5, 2023
001e995
prompt for user input if script is run manually/locally (#279)
mattops Dec 5, 2023
16031ec
PI-1717 Set session cookie name per-project (#280)
marcus-bcl Dec 6, 2023
7201579
Ensure product ID is set when bootstraping new projects (#281)
mattops Dec 7, 2023
92d8a3d
Update dependencies 2023-12-08 (#282)
psoleckimoj Dec 8, 2023
3e1aed8
HAAR-2061: Remove deprecated filed (#285)
ravmoj Dec 14, 2023
37fceaf
Add execute permission back to rename-project.bash script (#286)
mattops Dec 14, 2023
14f2b43
Remove jQueryUI, initialise moj frontend (#288)
psoleckimoj Dec 15, 2023
cf889c4
Update Helm release generic-service to 2.9 (#284)
renovate[bot] Dec 18, 2023
4dd8a6b
Update CHANGELOG.md (#275)
andrewrlee Dec 18, 2023
9584f7b
Update all non major NPM dependencies (#271)
renovate[bot] Dec 18, 2023
70c2877
HAAR-2154: bring project up to date with typescript template
SimonMitchellMOJ Dec 18, 2023
53ce22a
HAAR-2154: bring project up to date with typescript template
SimonMitchellMOJ Dec 18, 2023
3c70ad4
HAAR-2154: delete login test as we have signin test
SimonMitchellMOJ Dec 18, 2023
60e72df
Merge branch 'main' into sm-HAAR-template-changes
SimonMitchellMOJ Dec 18, 2023
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
28 changes: 14 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
hmpps: ministryofjustice/hmpps@7
hmpps: ministryofjustice/hmpps@8
slack: circleci/slack@4.12.5

parameters:
Expand All @@ -18,7 +18,7 @@ parameters:

node-version:
type: string
default: 18.12-browsers
default: 20.8-browsers

jobs:
build:
Expand All @@ -43,21 +43,16 @@ jobs:
- run:
command: |
npm run build
DATE=$(date '+%Y-%m-%d')
export BUILD_NUMBER=${DATE}.${CIRCLE_BUILD_NUM}
export GIT_REF="$CIRCLE_SHA1"
npm run record-build-info
- run: # Run linter after build because the integration test code depend on compiled typescript...
name: Linter check
command: npm run lint
- persist_to_workspace:
root: .
paths:
- node_modules
- build-info.json
- build
- dist
- .cache/Cypress
- assets/stylesheets

unit_test:
executor:
Expand All @@ -77,9 +72,8 @@ jobs:

integration_test:
executor:
name: hmpps/node_redis
node_tag: << pipeline.parameters.node-version >>
redis_tag: "6.2"
name: hmpps/node
tag: << pipeline.parameters.node-version >>
steps:
- checkout
- attach_workspace:
Expand All @@ -91,7 +85,7 @@ jobs:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: Get wiremock
command: curl -o wiremock.jar https://repo1.maven.org/maven2/com/github/tomakehurst/wiremock-standalone/2.27.1/wiremock-standalone-2.27.1.jar
command: curl -o wiremock.jar https://repo1.maven.org/maven2/org/wiremock/wiremock-standalone/3.3.1/wiremock-standalone-3.3.1.jar
- run:
name: Run wiremock
command: java -jar wiremock.jar --port 9091
Expand All @@ -109,9 +103,9 @@ jobs:
- store_test_results:
path: test_results
- store_artifacts:
path: integration-tests/videos
path: integration_tests/videos
- store_artifacts:
path: integration-tests/screenshots
path: integration_tests/screenshots

workflows:
version: 2
Expand Down Expand Up @@ -139,6 +133,8 @@ workflows:
name: deploy_dev
env: "dev"
jira_update: true
pipeline_id: <<pipeline.id>>
pipeline_number: <<pipeline.number>>
context: hmpps-common-vars
filters:
branches:
Expand All @@ -159,6 +155,8 @@ workflows:
# env: "preprod"
# jira_update: true
# jira_env_type: staging
# pipeline_id: <<pipeline.id>>
# pipeline_number: <<pipeline.number>>
# context:
# - hmpps-common-vars
# - hmpps-historical-prisoner-preprod
Expand All @@ -174,6 +172,8 @@ workflows:
# env: "prod"
# jira_update: true
# jira_env_type: production
# pipeline_id: <<pipeline.id>>
# pipeline_number: <<pipeline.number>>
# slack_notification: true
# slack_channel_name: << pipeline.parameters.releases-slack-channel >>
# context:
Expand Down
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"printWidth": 120,
"semi": false
}
]
],
"no-empty-function": ["error", { "allow": ["constructors", "arrowFunctions"] }]
}
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ dist
assets/stylesheets/*.css
.idea
.vscode
build-info.json
dist/
test_results/
integration_tests/videos/
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
30 changes: 16 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Stage: base image
FROM node:18.15-bullseye-slim as base
FROM node:20.8-bullseye-slim as base

ARG BUILD_NUMBER=1_0_0
ARG GIT_REF=not-available
ARG BUILD_NUMBER
ARG GIT_REF
ARG GIT_BRANCH

LABEL maintainer="HMPPS Digital Studio <info@digital.justice.gov.uk>"

Expand All @@ -14,8 +15,15 @@ RUN addgroup --gid 2000 --system appgroup && \

WORKDIR /app

# Cache breaking
ENV BUILD_NUMBER ${BUILD_NUMBER:-1_0_0}
# Cache breaking and ensure required build / git args defined
RUN test -n "$BUILD_NUMBER" || (echo "BUILD_NUMBER not set" && false)
RUN test -n "$GIT_REF" || (echo "GIT_REF not set" && false)
RUN test -n "$GIT_BRANCH" || (echo "GIT_BRANCH not set" && false)

# Define env variables for runtime health / info
ENV BUILD_NUMBER=${BUILD_NUMBER}
ENV GIT_REF=${GIT_REF}
ENV GIT_BRANCH=${GIT_BRANCH}

RUN apt-get update && \
apt-get upgrade -y && \
Expand All @@ -25,8 +33,9 @@ RUN apt-get update && \
# Stage: build assets
FROM base as build

ARG BUILD_NUMBER=1_0_0
ARG GIT_REF=not-available
ARG BUILD_NUMBER
ARG GIT_REF
ARG GIT_BRANCH

RUN apt-get update && \
apt-get install -y make python g++
Expand All @@ -37,10 +46,6 @@ RUN CYPRESS_INSTALL_BINARY=0 npm ci --no-audit
COPY . .
RUN npm run build

RUN export BUILD_NUMBER=${BUILD_NUMBER} && \
export GIT_REF=${GIT_REF} && \
npm run record-build-info

RUN npm prune --no-audit --omit=dev

# Stage: copy production assets and dependencies
Expand All @@ -51,9 +56,6 @@ COPY --from=build --chown=appuser:appgroup \
/app/package-lock.json \
./

COPY --from=build --chown=appuser:appgroup \
/app/build-info.json ./dist/build-info.json

COPY --from=build --chown=appuser:appgroup \
/app/assets ./assets

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2021 Crown Copyright (Ministry of Justice)
Copyright (c) 2020-2023 Crown Copyright (Ministry of Justice)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ Our security policy is located [here](https://github.com/ministryofjustice/hmpps

More information about the template project including features can be found [here](https://dsdmoj.atlassian.net/wiki/spaces/NDSS/pages/3488677932/Typescript+template+project).

## Creating a CloudPlatform namespace
## Creating a Cloud Platform namespace

When deploying to a new namespace, you may wish to use this template typescript project namespace as the basis for your new namespace:

<https://github.com/ministryofjustice/cloud-platform-environments/tree/main/namespaces/live.cloud-platform.service.justice.gov.uk/hmpps-template-typescript>

This template namespace includes an AWS elasticache setup - which is required by this template project.

Copy this folder, update all the existing namespace references, and submit a PR to the CloudPlatform team. Further instructions from the CloudPlatform team can be found here: <https://user-guide.cloud-platform.service.justice.gov.uk/#cloud-platform-user-guide>
Copy this folder, update all the existing namespace references, and submit a PR to the Cloud Platform team. Further instructions from the Cloud Platform team can be found here: <https://user-guide.cloud-platform.service.justice.gov.uk/#cloud-platform-user-guide>

## Renaming from HMPPS Template Typescript - github Actions

Expand All @@ -48,12 +48,16 @@ It then performs a search and replace and directory renames so the project is re

To ensure notifications are routed to the correct slack channels, update the `alerts-slack-channel` and `releases-slack-channel` parameters in `.circle/config.yml` to an appropriate channel.

## Filling in the `productId`

To allow easy identification of an application, the product Id of the overall product should be set in `values.yaml`. The Service Catalogue contains a list of these IDs and is currently in development here https://developer-portal.hmpps.service.justice.gov.uk/products

## Running the app
The easiest way to run the app is to use docker compose to create the service and all dependencies.

`docker-compose pull`
`docker compose pull`

`docker-compose up`
`docker compose up`

### Dependencies
The app requires:
Expand All @@ -64,7 +68,7 @@ The app requires:

To start the main services excluding the example typescript template app:

`docker-compose up --scale=app=0`
`docker compose up --scale=app=0`

Install dependencies using `npm install`, ensuring you are using `node v18.x` and `npm v9.x`

Expand All @@ -84,9 +88,9 @@ And then, to build the assets and start the app with nodemon:

### Running integration tests

For local running, start a test db, redis, and wiremock instance by:
For local running, start a test db and wiremock instance by:

`docker-compose -f docker-compose-test.yml up`
`docker compose -f docker-compose-test.yml up`

Then run the server in test mode by:

Expand All @@ -100,8 +104,12 @@ Or run tests with the cypress UI:

`npm run int-test-ui`

## Change log

A changelog for the service is available [here](./CHANGELOG.md)


### Dependency Checks
## Dependency Checks

The template project has implemented some scheduled checks to ensure that key dependencies are kept up to date.
If these are not desired in the cloned project, remove references to `check_outdated` job from `.circleci/config.yml`
1 change: 1 addition & 0 deletions assets/js/mojFrontendInit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
window.MOJFrontend.initAll()
5 changes: 5 additions & 0 deletions assets/scss/components/_header-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,8 @@
display: none;
}
}

.govuk-phase-banner {
@include govuk-width-container;
border: none;
}
2 changes: 1 addition & 1 deletion audit-ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"low": true,
"package-manager": "auto",
"registry": "https://registry.npmjs.org",
"allowlist": ["GHSA-9c47-m6qq-7p4h"]
"allowlist": []
}
5 changes: 2 additions & 3 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from 'cypress'
import { resetStubs } from './integration_tests/mockApis/wiremock'
import auth from './integration_tests/mockApis/auth'
import manageUsersApi from './integration_tests/mockApis/manageUsersApi'
import tokenVerification from './integration_tests/mockApis/tokenVerification'

export default defineConfig({
Expand All @@ -12,15 +13,13 @@ export default defineConfig({
reporterOptions: {
configFile: 'reporter-config.json',
},
videoUploadOnPasses: false,
taskTimeout: 60000,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on) {
on('task', {
reset: resetStubs,
...auth,
...manageUsersApi,
...tokenVerification,
})
},
Expand Down
7 changes: 0 additions & 7 deletions docker-compose-test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
version: '3.1'
services:

redis:
image: 'redis:7.0'
networks:
- hmpps_int
ports:
- '6379:6379'

wiremock:
image: wiremock/wiremock
networks:
Expand Down
25 changes: 12 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
version: '3.1'
services:

redis:
image: 'redis:7.0'
networks:
- hmpps
container_name: redis
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- '6379:6379'

hmpps-auth:
image: quay.io/hmpps/hmpps-auth:latest
networks:
Expand All @@ -25,21 +15,30 @@ services:
- APPLICATION_AUTHENTICATION_UI_ALLOWLIST=0.0.0.0/0

app:
build: .
build:
context: .
args:
BUILD_NUMBER: "1.0.0"
GIT_REF: "a1b2c3"
GIT_BRANCH: main
networks:
- hmpps
depends_on: [redis]
ports:
- "3000:3000"
environment:
- REDIS_HOST=redis
- PRODUCT_ID=UNASSIGNED
- REDIS_ENABLED=false
- HMPPS_AUTH_EXTERNAL_URL=http://localhost:9090/auth
- HMPPS_AUTH_URL=http://hmpps-auth:8080/auth
# These will need to match new creds in the seed auth service auth
- API_CLIENT_ID=client-id
- API_CLIENT_SECRET=client-secret
- SYSTEM_CLIENT_ID=system-client-id
- SYSTEM_CLIENT_SECRET=system-client-secret
- SESSION_SECRET=somesecretvalue
- TOKEN_VERIFICATION_API_URL=http://hmpps-auth:8080/auth
- TOKEN_VERIFICATION_ENABLED=false
- INGRESS_URL=http://localhost:3000

networks:
hmpps:
3 changes: 3 additions & 0 deletions feature.env
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
PORT=3007
HMPPS_AUTH_URL=http://localhost:9091/auth
MANAGE_USERS_API_URL=http://localhost:9091/manage-users-api
TOKEN_VERIFICATION_API_URL=http://localhost:9091/verification
TOKEN_VERIFICATION_ENABLED=true
REDIS_ENABLED=false
NODE_ENV=development
API_CLIENT_ID=clientid
API_CLIENT_SECRET=clientsecret
SYSTEM_CLIENT_ID=clientid
SYSTEM_CLIENT_SECRET=clientsecret
ENVIRONMENT_NAME=dev
2 changes: 1 addition & 1 deletion helm_deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ cloud-platform-environments/namespaces/live-1.cloud-platform.service.justice.gov

Ensure the certificate is created and ready for use.

The name of the kubernetes secret where the certificate is stored is used as a value to the helm chart - this is used to configured the ingress.
The name of the kubernetes secret where the certificate is stored is used as a value to the helm chart - this is used to configure the ingress.