This repository holds several resources used by my other repositories on GitLab.
Reusable components for GitLab CI/CD pipelines.
sane-workflow
- Prevent duplicated pipelines.stages
- Default stages used in all my projects.
How to use:
include:
- component: gitlab.com/vaz-projects/gitlab/[email protected]
All components in this repository use the following conventions.
-
Include the
stages
component. Most other components depend on it.include: - component: gitlab.com/vaz-projects/gitlab/[email protected]
-
Don't use
stage
directly. Use the provided base jobs instead. They properly define the rules for each stage (and have ✨pretty✨ names).job: extends: .buildStage
-
When using
extends
andrules
: Include a reference to the base job's rules. Otherwise, all other rules would be overwritten.job: extends: .baseJob rules: - $VAR == 'VALUE' - !reference [ .baseJob, rules ]
The stages
component support two different deployment styles:
-
Deploy on tag pipelines. Default branch is used pro development. Good for versioned releases.
feature-branch/without-mr
: Build & Testfeature-branch/with-mr
: Build & Test -> Deploy to review appdefault-branch
: Build & Testtag
: Build & Test -> Deploy to staging -> Deploy to production
-
Deploy on default branch pipelines. Default branch is used for staging and production. Good for continuous delivery/deployment.
feature-branch/without-mr
: Build & Testfeature-branch/with-mr
: Build & Test -> Deploy to review appdefault-branch
: Build & Test -> Deploy to staging -> Deploy to productiontag
: Build & Test
include:
- component: gitlab.com/vaz-projects/gitlab/[email protected]
inputs:
deployOn: defaultBranch
TODO
TODO
TODO