eps-cdk-constructs 1.0.174
Install from the command line:
Learn more about npm packages
$ npm install @nhsdigital/eps-cdk-constructs@1.0.174
Install via package.json:
"@nhsdigital/eps-cdk-constructs": "1.0.174"
About this version
This repository contains a docker image used to deploy CDK to our environments and a CDK constructs library for common EPS project patterns.
-
docker/Contains Dockerfile used to build image used fo for CDK deployments -
packages/cdkConstructs/Contains common CDK constructs used in EPS projects -
scripts/Utilities helpful to developers of this specification -
.github/Contains GitHub workflows that are used for building and deploying from pull requests and releases
A release of this code happens automatically every Wednesday, but can also be triggered manually by running the release workflow.
The release workflow does the following
- creates a new tagged version
- creates a new version of the cdk construct library and publishes it to github
- pushes the cdk-utils docker image to dev and all other environments (subject to manual release approval in github actions)
This contains common CDK constructs used in EPS projects.
Available constructs are:
-
TypescriptLambdaFunction- A reusable construct for TypeScript Lambda functions
Contributions to this project are welcome from anyone, providing that they conform to the guidelines for contribution and the community code of conduct.
This code is dual licensed under the MIT license and the OGL (Open Government License). Any new work added to this repository must conform to the conditions of these licenses. In particular this means that this project may not depend on GPL-licensed or AGPL-licensed libraries, as these would violate the terms of those libraries' licenses.
The contents of this repository are protected by Crown Copyright (C).
It is recommended that you use Visual Studio Code and a devcontainer as this will install all necessary components and correct versions of tools and languages. See https://code.visualstudio.com/docs/devcontainers/containers for details on how to set this up on your host machine.
All commits must be made using signed commits.
To test changes to the construct library, you need to package the library and install it on the project you want to test it on.
Either
- run
make packagefrom this project and copy the .tgz file from lib folder to the project you want to test in - create a pull request and from the pull request workflow run, download nhsdigital-eps-cdk-constructs-1.0.0.tgz to the project you want to test in
In the project you want to test in, run the following
npm install --save NHSDigital-eps-cdk-constructs-1.0.0.tgz --workspace packages/cdk/You will then be able to use it - for example:
import {TypescriptLambdaFunction} from "@NHSDigital/eps-cdk-constructs"There are make commands that are run as part of the CI pipeline and help alias some
functionality during development.
-
install-nodeInstalls node dependencies -
install-pythonInstalls python dependencies -
install-hooksInstalls git pre commit hooks -
installRuns all install targets
-
lintRuns lint for all code -
testRuns unit tests for all code
-
compileCompiles all code -
packageCreates distributable tarball of CDK constructs
-
check-licensesChecks licenses for all packages used
-
cleanClears up any files that have been generated by building or testing locally -
deep-cleanRuns clean target and also removes any node_modules and python libraries installed locally