GitLab CI Templates
Table of Contents
Similar to project templates, I also found myself building GitLab CI pipelines. You can link to these templates from any GitLab instance that can reach GitLab.com or embedded in projects if otherwise. You can also configure the pipelines with CI/CD variables.
See the project’s repo to know more.
GitLab CI for Python #
This pipeline template works well with my Python project template. It will run unit tests and style checks, generate release tags,
and push to a PyPI instance. It will only run jobs in the test
stage for quicker iteration in merge requests.
Demos:
- Merge request pipeline
- Main pipeline with automated tagging
- Main pipeline with manual tagging, triggered by a release
GitLab CI for Docker #
This pipeline template implements what I posted about running Docker in GitLab. The main feature here is that for merge requests, the pipeline builds Docker images, and after merging, it builds and pushes to your container image registry.
Demos:
GitLab CI for Terraform #
GitLab will obsolete their Terraform CI templates, so I kept them and optimised them for my needs. These templates have multiple variants for simple Terraform projects to multiple stages or environments.
Demos: