The frontend for GOV.UK Verify
Installing the application
Once you’ve cloned this then
bundle will install the requirements.
Alternatively, build a Docker container with a command such as:
docker build . --network host -t verify-frontend
Running the application
You can start the application without having any of the closed source components installed with:
To start a journey on the front end visit http://localhost:50300/test-saml and click
If you're on the Verify team and have the rest of the federation running locally you should omit the
and start your journey from the test-rp.
Running the tests
./pre-commit-local.sh runs tests in a docker container which uses the specified
This will lint the application code and run the tests.
If you plan to edit this file please enable the pre-commit check which lints it, preventing mistakes.
To do so, first install pre-commit and then run
On an OSX system this amounts to:
brew install pre-commit pre-commit install
Deploying the application
The application is deployed using our CI/CD pipeline.
Any changes merged to master are automatically deployed. This repo has an active branch protection for
master. Any changes need to be raised via PR and approved by two other developers.
When a PR is raised, it's automatically tested using Travis (runs the ./pre-commit.sh script on the branch and against master) which is configured in the .travis file. The test results are shown directly on the PR.
In addition to the Travis tests we have also enabled Codacy to check coding style. Again, the results are shown within the PR. Codacy is configured using the .rubocop.yml file.
The PR is also deployed to Heroku as a review app. The app is destroyed when the PR is closed/merged or after 5 days of inactivity. It uses docker to run both the Rails app and the stub API server. The Heroku deployment is configured using the 4 files:
Dockerfile.heroku- to configure the docker image of frontend
heroku.yml- Heroku deployment manifest
app.json- Heroku application manifest
heroku-startup.sh- startup script used to start the app and api, on the port supplied by Heroku
To view or rebuild a Heroku review app sign into Heroku using the credentials stored in
verify-blackbox-passwords. The file inside blackbox is called
heroku-verify-build-bot. Once logged in it will bring up the dashboard, click on
verify-frontend. On the left is the column for review apps based on PR's raised and the option under them to open or create a review app.
Cross GOV.UK Domain Google Analytics
To track user journeys across the whole of GOV.UK, including Verify, Google Analytics code has been introduced to the Verify Frontend.
We will occasionally be asked to add domains to the list of domains for which cross domain tracking is enabled. This list is injected through the
environment variable, which is set in the
by setting the
cross_gov_ga_domain_names variable in the
site.tf for the relevant environment.
GOV.UK Design System 3
GOV.UK frontend is included in the repository under
lib/node_modules. This is installed using
Should you have to update the GOV.UK frontend in the future you'll need to run npm within the lib directory and
commit the results. e.g.
git checkout -b <some_branch_name> cd ./lib npm update git add . git commit push