IntegrationsGitLab CI
GitLab CI
Integrate Valqore into GitLab CI/CD pipelines.
GitLab CI
Valqore provides a reusable CI template that adds a valqore stage to evaluate manifests and post results as a merge-request comment.
Quick Start
include:
- remote: "https://raw.githubusercontent.com/valqore/ci-templates/main/gitlab-ci-valqore.yml"Full Configuration
# .gitlab-ci.yml
include:
- remote: "https://raw.githubusercontent.com/valqore/ci-templates/main/gitlab-ci-valqore.yml"
stages:
- build
- test
- valqore
- deploy
valqore_analysis:
stage: valqore
variables:
VALQORE_MANIFESTS: "k8s/"
VALQORE_FAIL_ON: "block"
VALQORE_CARBON_REGION: "eu-west-1"
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- k8s/**/*
- manifests/**/*
- helm/**/*
- terraform/**/*MR Comment
To enable merge request comments, add a project or group access token with the api scope:
valqore_analysis:
stage: valqore
variables:
VALQORE_MANIFESTS: "k8s/"
VALQORE_FAIL_ON: "block"
VALQORE_GITLAB_TOKEN: $GITLAB_API_TOKENVariables Reference
| Variable | Required | Default | Description |
|---|---|---|---|
VALQORE_MANIFESTS | Yes | -- | Path or glob to manifests. |
VALQORE_FAIL_ON | No | block | Verdict level that fails the job. |
VALQORE_CARBON_REGION | No | us-east-1 | Cloud region for carbon calculations. |
VALQORE_GITLAB_TOKEN | No | -- | GitLab API token for MR comments. |
VALQORE_API_KEY | Yes | -- | Valqore API key (store as CI/CD variable). |
Was this helpful?
Prev
Next