Project creating Family Private Law (PRL) CCD config files...
Updated with Release 4.0 and Solicitor upload journey
Clone project and in the project directory run:
yarn install && yarn reset-ccd-submodule
Check package.json
for a list of yarn
scripts for XLS file generation and project management. Eg. AAT XLS file can
be generated with yarn generate-excel-aat
Make sure you have added the label 'enable_keep_helm' while creating the PR. Otherwise, add the label and re-trigger the build.
When trying to create a XLS file ends with error message mentioning a module cannot be found
Example error output
yarn run v1.22.5
$ TARGET_ENV=aat CCD_DEF_COS_URL=$npm_package_config_aat_cosUrl CCD_DEF_CCD_URL=$npm_package_config_aat_ccdUrl yarn run generate-excel -e *-prod.json
$ yarn --cwd ccd-definition-processor json2xlsx -D ../definitions/private-law/json -o ../definitions/private-law/xlsx/ccd-config-PRL-${TARGET_ENV:-base}.xlsx -e '*-prod.json'
$ node ./bin/json2xlsx -D ../definitions/private-law/json -o ../definitions/private-law/xlsx/ccd-config-PRL-aat.xlsx -e '*-prod.json'
node:internal/modules/cjs/loader:927
throw err;
^
Error: Cannot find module 'matcher'
Require stack:
- [...]/prl-ccd-definitions/ccd-definition-processor/src/main/lib/file-utils.js
- [...]/prl-ccd-definitions/ccd-definition-processor/src/main/json2xlsx.js
- [...]/prl-ccd-definitions/ccd-definition-processor/bin/json2xlsx.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
at Function.Module._load (node:internal/modules/cjs/loader:769:27)
at Module.require (node:internal/modules/cjs/loader:996:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object.<anonymous> ([...]/prl-ccd-definitions/ccd-definition-processor/src/main/lib/file-utils.js:4:17)
at Module._compile (node:internal/modules/cjs/loader:1092:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
at Module.load (node:internal/modules/cjs/loader:972:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Module.require (node:internal/modules/cjs/loader:996:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'[...]/prl-ccd-definitions/ccd-definition-processor/src/main/lib/file-utils.js',
'[...]/prl-ccd-definitions/ccd-definition-processor/src/main/json2xlsx.js',
'[...]/prl-ccd-definitions/ccd-definition-processor/bin/json2xlsx.js'
]
}
try to reset definition processor submodule with yarn reset-ccd-submodule
. Prerequisite: yarn install
had been run before.
SHOW_BROWSER_WINDOW=true PARALLEL_CHUNKS=5 yarn test
After the yarn upgrade you need to follow the below steps to ensure that yarn commands are working fine in local:
- Ensure that branch is synched with master
- Run yarn install in local
- Run yarn reset-ccd-submodule in local
- Now you can run the yarn commands locally.
- Also the file to update the environment urls is now env.json (env.json is read by json-env.js)
- No changes are needed in this repository, and everything will be set automatically.
- Update the following section in the values.preview.template.yaml file:
prl-cos: java: image: hmctspublic.azurecr.io/prl/cos:pr-3036 # Replace 3036 with the PR number of the prl-cos update you want to test against this repo.
- If you make additional changes to the cos pr, the easiest way to reflect them in this repo is to delete the cos pod of this PR so it pulls the latest image from the PR:
kubectl delete pod -n private-law prl-ccd-definitions-pr-2600-java-64b88bc8f4-ffn2v
- After testing, make sure to revert the above change to use the latest prl-cos image:
prl-cos: java: image: hmctspublic.azurecr.io/prl/cos:latest
Functional end-to-end (E2E) tests are hosted in the prl-e2e-tests repository.
To run E2E tests on your PR build, add the label enable-prl-e2e-tests
. This will initiate a Playwright smoke test. Developers should add this label when their changes are ready for code review.
Smoke tests from this repository are executed by triggering a build job in Jenkins.
The smoke test is run against AAT in the master build.
Preview is now set up with a PostgreSQL flexible server. The database host is private-law-preview.postgres.database.azure.com
.
While the databases are listed in values.preview.template.yaml under postgresql
section.
The password is present in aat key value under the secret preview-db-password
On the pull request set label pr-values:wa
To test DMN changes update the branch name in Jenkinsfile_CNP file (def dmnBranch = "<branch_name>"
).
Note: Before merging, revert it to the master branch (def dmnBranch = "master"
)
To add new AAT user to preview update preview-am-role-assignments.json.