Let's assume we have 2 stages: Dev
and Staging
, and Dev
is the first stage (with upstream: latest: true
).
Usually we want to run some test on Dev
, before running a release train from Dev
to Staging
.
sequenceDiagram title Release Train Flow with Locking
autonumber
Dev-to-Staging ->> Kuberpult: Lock Dev
activate Kuberpult
Dev-to-Staging ->> Dev-to-Staging: System Tests Dev
Dev-to-Staging ->> Kuberpult: Release Train Dev-to-Staging
Dev-to-Staging ->> Kuberpult: Unlock Dev
deactivate Kuberpult
Dev-to-Staging ->> Kuberpult: Release Train Main-to-Dev
- Running the system tests takes time, so the first step is to lock the environment
Dev
. Now we are sure that no automated process deploys different versions onDev
, and manual processes (humans) get a warning before deploying toDev
. - Now run the system tests on
Dev
. - If the tests are successful, we run the release train
Dev
toStaging
. - Now we unlock
Dev
(independent of the test result). - We had
Dev
locked for a while, so there may be new changes that were stopped by the lock. To catch upDev
to the latest changes, we run a release train frommain
(this refers to the git branch) toDev
. This also needs to be done independent of the test result.
The same principle can be used multiple times, e.g. first Dev
-> Staging
, then Staging
-> Production
.
For illustration purposes we used Environments here as examples, but the same also works for Environment Groups.