Deployment occurs automatically upon merging into the main branch. This deployment will go to the sandbox, dev, and production environments.
As deployment occurs, the commit hash that is deployed to production will be tagged as a production release with a timestamp of when it went live, this tag will follow the format: prod-release-<timestamp>-<commit-hash>
. Looking like this: prod-release-2022-08-31-14-09-1212c83
.
Deployment is handled by Github Actions, the workflow that handles this can be found in multiple workflows, one for each environment:
See the environments document for more information on these environments.
PRs aimed at the main branch have two mandatory requirements:
- At least one approving code review from someone in the CODEOWNERS file in the repo, this can be seen here.
- Passing tests and code linters that will automatically run when your code is pushed
Approval from the product owner, testing can be performed using the review app that is deployed automatically for all PRs.
Environment variables are set within the Github repository, these are then passed to CloudFoundry when the application is deployed.
Environment variables can be managed at (https://github.com/DFE-Digital/npq-registration/settings/secrets/actions).
These will then be available within the Github Action workflows as secrets.<secret_name>
. This can be seen in each of the deployment scripts linked above.
Environment variables intended for setting on the CloudFoundry application itself are passed into the cf push
command as --var <key>=<value>
.
They are then set as environment variables on the application's environment manifest: