Set Environments using Rules keyword
Problem to solve
Try to create a pipeline that should deploy automatically on multiples environment.
In order to do this, I would like to use rules
to decide which environment should be used regarding the current branch or tag.
Intended users
- Delaney (Development Team Lead)
- Sasha (Software Developer)
- Devon (DevOps Engineer)
- Sidney (Systems Administrator)
- Sam (Security Analyst)
- Dana (Data Analyst)
Personas are described at https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/ -->
Further details
In order to keep the pipeline as simple as possible I could be interesting to define each job once and to be able to target different environment based on some rules like the type of branch/tag of a particular commit
Proposal
add environment
or variables
(proposed here #33564 (closed)) support to rules
keyword
Permissions and Security
Documentation
We should add this section in permetted attributes too https://docs.gitlab.com/ee/ci/yaml/README.html#permitted-attributes
Testing
We should be able to deploy an app on prod
environment if the build were triggered by the master branch.
All other branch should deploy on a test
environment.
What does success look like, and how can we measure that?
We should be able to simplify our pipelines: remove some duplication and to have a more easy to maintain pipeline
What is the type of buyer?
All users