Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
GitLab CI/CD Components
This repo contains a collection of different GitLab CI/CD Components and snippets to be included in the script section of a job.
Currently supported components are:
- Code Quality: pre-commit
- Build: Helm package
- Container Build: Buildkit
- Container Build: Kaniko
- Container Build: Buildah
- Container Build: Merge-Manifests
- Security: Trivy container scan
- Security: Cosign container sign
- Deployment: Helm install/upgrade
Currently supported snippets are:
- debian-core-tools
- alpine-core-tools
- openssl-install
- ssh-client-install
- jq-install
- git-install
- kubectl-install
- kubeseal-install
- kubeconform-install
- skopeo-install
- cosign-install
- talosctl-install
- vault-install
- helm-install
- helm-docs-install
- packer-install
- kind-install
- minikube-install
- argocd-cli-install
- terraform-install
- opentofu-install
- tflint-install
- tailscale-install
- minio-mc-install
- yq-by-mike-farah-install
- github-cli-install
- azure-cli-install
- aws-cli-install
- aws-ssm-install
- aws-ecr-credential-helper-install
Examples
NOTE: All components and snippets are arm64 ready. Gitlab now offers hosted ARM runners.
For more see .gitlab-ci.yml
Components
default:
tags: [saas-linux-small-arm64]
# or by including as a template and setting it by extending the job
include:
- component: gitlab.com/hegerdes/gitlab-actions/buildkit-build@<VERSION>
inputs:
as_job: .my-buildkit-build
my-buildkit-build:
tags: [saas-linux-small-arm64]
extends: .my-buildkit-build
Snippets
- project: hegerdes/gitlab-actions
file: .gitlab/ci/snippets.yml
# Or
- remote: https://gitlab.com/hegerdes/gitlab-actions/-/raw/main/.gitlab/ci/snippets.yml
snippets:
image: alpine
script:
- echo "Running snippets on ${CI_RUNNER_EXECUTABLE_ARCH}..."
- !reference [.snippets, debian-core-tools]
- !reference [.snippets, alpine-core-tools]
- !reference [.snippets, openssl-install]
- !reference [.snippets, kubectl-install]
- !reference [.snippets, kubeseal-install]
- !reference [.snippets, kubeconform-install]
Releases
All releases follow the semantic versioning schema. So only major version bumps should include breaking changes. The main branch is NOT stable and may have broken components. Use a fixed tag or fork this repo if you dan't want your CI to break unexpectedly.
Releases are generated with CI and contain all mentionable changes.
Contribute
Feel free to open a issue or a PR. Any new CI tasks must have tests for them and must run on amd64 and arm64. Please read about CI/CD components and best practices at: https://docs.gitlab.com/ee/ci/components