Skip to main content

Repository: special-route-publisher

Publishes special routes on GOV.UK

Ownership
#govuk-publishing-experience-tech
Hosting
N/A
Category
Utilities

README

Publishes special routes to the Publishing API on behalf of other apps.

Technical documentation

You can use the GOV.UK Docker environment to run the tests and rake commands on your local machine. Follow the usage instructions to get started.

Use GOV.UK Docker to run any commands that follow.

Running the test suite

bundle exec rake

Adding new routes

Add an entry to /data/special_routes.yaml, for example:

- :content_id: 'c1f08359-21f7-49c1-8811-54bf6690b6a3'
  :base_path: '/account/home'
  :title: 'Account home page'
  :rendering_app: 'frontend'

You can generate a new value for content_id by running SecureRandom.uuid in a ruby console.

NOTE

If there is any other route published at that base_path by another app, that will get overridden by routes published here.

Publishing routes

You will need to start Publishing API and Content Store to run the following commands locally.

To publish all routes:

env PUBLISHING_API_BEARER_TOKEN=abc bundle exec rake publish_special_routes

To publish one route:

env PUBLISHING_API_BEARER_TOKEN=abc bundle exec rake publish_one_route["/base-path"]

See “Publish special routes” for quick links to the Jenkins jobs that invoke the rake tasks above.

Deployment

This app isn’t deployed anywhere. The repository is cloned by the Jenkins jobs, so any new changes are immediately picked up by the rake tasks.

Licence

MIT License