Add environment: action: verify and action: access
Release notes
Previously, when using Environments, there was only one keyword to perform the many different tasks related to deployment but not actually deploying. In 15.0, we have added two new keywords to execute tasks that require access to environment scope variables. You can now add environment: action: access
in the .gitlab-ci.yaml file for a broad set of use cases and environment: action: verify
when specifically needing to verify the results during a deployment.
Problem to solve
Users need a way to add a post-deployment step in the CI/CD pipeline to check that the deployment was successful. This step may require access to environment scope. GitLab has existing keywords, such as prepare
(that may already be used as a workaround) but we would like a different word to convey a different semantic.
Users also use <code data-sourcepos="8:18-8:24">prepare</code> to in other case (internal), e.g. for running migrations, or promoting environments.
Proposal
Create a new environment:action
(docs) job keywords called verify
and access
. For the MVC, these keywords behaves the same as prepare
(does not count as a deployment and has access to the env-scoped variables).
Original proposal
environment:
action: verify
OR
environment:
action: check
Feature: Use already defined environment scoped variables to check
or verify
an environment endpoint to validate it's working ok, post deployment in a subsequent job.
Why: This allows for us to stop abusing action: prepare
for what is technically not a "prepare" step. We’ve been using this so that we can access scoped variables without counting as a deployment.