In order to make the hmrc-frontend assets easy to consume in a JVM environment,
the npm build:webjar
task builds a JVM compatible webjar. This webjar is published to HMRC's open
artefact repository by an internal automated deployment process and is a dependency of
hmrc/play-frontend-hmrc.
When testing changes in conjunction with play-frontend-hmrc
and consuming frontend microservices,
it's possible to publish the hmrc-frontend webjar locally as follows. You will need Java
and Maven installed.
npm run build:package
npm run build:webjar
npm run publish-local:webjar
You can then reference the webjar in the LibDependencies.scala
file in play-frontend-hmrc
as follows:
"uk.gov.hmrc.webjars" % "hmrc-frontend" % "X.Y.Z"
You will also need to configure your build.sbt
resolvers to look in your local Maven repository:
.settings(
...
resolvers += Resolver.mavenLocal,
...
)
Further documentation on the webjar mechanism can be found:
- https://www.webjars.org/documentation
- https://www.playframework.com/documentation/2.8.x/AssetsOverview
Occasionally, we need to release a patch to earlier major versions of the library, to fix critical issues or make mandatory changes for services on earlier versions that can't easily upgrade to the latest. An example of this was the mandated switch to use the Tudor Crown branding following the accession of King Charles III.
We use the following workflow for patch releases:
- Create a release branch for the new version, based on the tag of the older version, eg.
git checkout -b release/v4.5.1 tags/v4.5.0
- Push release branch to github, eg.
git push -u origin release/v4.5.1
- Create a feature branch off the release branch, for the required changes, eg.
git checkout -b PLATUI-999-my-critical-changes
- Bump the patch version on your local feature branch
npm version patch
- Make and test the required changes on your local feature branch
- Once you're happy with your changes, push them up to GitHub
git push -u origin PLATUI-999-my-critical-changes
- Raise a PR from the feature branch into the release branch (to get the changes approved before building the new version), eg. using the GitHub CLI
gh pr create -B release/v4.5.1
- Once approved and merged, do a branch build of the release branch in Jenkins - this will build and tag the release, eg. v4.5.1, and publish it to artifactory ready for consumption
- Eventually, delete the release branch so that there's just the tag left behind
gitGraph LR:
commit tag:"4.5.0" id:"older release"
branch "release/4.5.1"
commit id:"branch off old tag"
branch feature/some-urgent-fix
commit id:"branch off release branch"
commit id:"make some changes"
commit id:"make more changes"
checkout "release/4.5.1"
merge "feature/some-urgent-fix" id:"PR to release branch"
commit tag:"4.5.1" id:"tagged by jenkins"
commit type:HIGHLIGHT id:"never merged back"
checkout main
commit tag:"5.0.0" id:"major release"
commit tag:"5.1.0" id:"minor release"
commit tag:"6.0.0" id:"latest"
We are using MADRs to record significant decisions in this service. To find out more visit MADR
See our decision log for a list of past decisions.
-
Copy template.md as NNNN-title-of-decision.md, and fill in the fields. Do not feel you have to fill in all the fields, only fill in fields that are strictly necessary. Some decisions will merit more detail than others.
-
To re-generate the listing page for previous decisions so it includes the new decision, run:
npm run docs:generate-decision-log-listing