The continuous delivery has multiple phases, first is a closed-loop test, then are the runtime environments, which are promoted, starting with acceptance test.
This first delivery stage used docker-compose to stand-up, test and tear-down an environment. This environment is transient and not accessible by manual testers.
services:
classb:
image: "${CLASSB_TAG}"
ports:
- "8000:8000"
test:
image: "${TEST_TAG}"
volumes:
- ${WORK_SPACE}:/solution/workspace
links:
- classb:classb
depends_on:
- classb
After the closed-loop tests have passed, then the deployment to user acceptance test is performed. In source control, the configuration management table defines the target environments and their GTM ID.
The GTM ID publicly accessible in the static content, and therefore does not need to be managed as a secret, i.e. can be plain text in source control.
context target deployTaskOverride github_repo gtm_id
local TEST push-static-content.tsk classb-test.opennz.org G-JM71HCEG2Q
local PROD push-static-content.tsk classb.opennz.org GTM-5VSBHSV
At deploy-time the GTM ID for the target environment is detonised in the static content before pushing it to the content delivery network CDN.
The release includes both the build-time and deploy-time detokenised content.