This is the happy path to a working Brik pipeline on a GitLab instance. For the full integration reference (runner images, pipeline variables, cache relocation, coverage reports, troubleshooting), see platforms/gitlab.md.
- A GitLab instance where you can create projects.
- A GitLab Runner with the Docker executor.
- Access to
ghcr.io/getbrik/*images, or a mirror of brik-images on your own registry.
Create a brik/brik project on your GitLab instance and push the Brik source:
git clone https://github.com/getbrik/brik.git
cd brik
git remote add gitlab http://your-gitlab.example.com/brik/brik.git
git push gitlab main --tagsCreate a brik/gitlab-templates project and push the shared-libs/gitlab
directory:
cd shared-libs/gitlab
git init -b main
git add -A
git commit -m "Initial commit"
git remote add origin http://your-gitlab.example.com/brik/gitlab-templates.git
git push -u origin main
git tag v0.7.0 # pin to the Brik release you pushed in step 1
git push origin v0.7.0Add a .gitlab-ci.yml to your project root. This file is the GitLab adapter
wiring: a thin entry point that hands your run to Brik. It carries no delivery
logic of its own; the pipeline itself is defined by the brik.yml you add next
(step 4), identical on every platform.
include:
- project: 'brik/gitlab-templates'
ref: v0.7.0 # the gitlab-templates tag from step 2
file: '/templates/brik-integrate.yml'On GitLab this materializes as a single classic pipeline: a brik-plan job
computes the execution plan, then every stage job consults it and skips itself
when the plan marks the stage not-applicable; for example, a docs-only commit
shows the skipped stages as green "skipped (per plan)" jobs without running
their work. See platforms/gitlab.md for the
full job graph.
Add a brik.yml to your project root. The minimum is two fields:
version: 1
project:
name: my-app
stack: nodebrik init --platform gitlab can scaffold both files for you; see
getting-started/local.md.
That is it. Your next push runs the full fixed flow: Init detects the stack and resolves the runner image, then Build, the parallel Lint / SAST / Scan / Test group, Package, Container Scan, Deploy, and Notify run in order. Every run produces an aggregate report.
Once CI is working, to use the CD flow with attestation verification:
- Create an infrastructure referential (endpoints, credentials, policies,
trust material) and mount it on the runner at
/etc/brik/infra. See artifact attestation. - Select CI or CD per run with
include:rules: one repository, two flows, discriminated by theBRIK_DEPLOY_VERSIONtrigger variable:
include:
- project: 'brik/gitlab-templates'
ref: v0.7.0
file: '/templates/brik-integrate.yml'
rules:
- if: '$BRIK_DEPLOY_VERSION !~ /.+/'
- project: 'brik/gitlab-templates'
ref: v0.7.0
file: '/templates/brik-deploy.yml'
rules:
- if: '$BRIK_DEPLOY_VERSION =~ /.+/'A push or tag runs the CI flow; a "Run pipeline" (or API trigger) with
BRIK_DEPLOY_VERSION and BRIK_DEPLOY_ENVIRONMENT runs the CD flow, which
resolves the version to a digest, verifies the attestations and checks the
promotion journal before deploying. See
platforms/gitlab.md for the full setup.
- Configuration overview: what you can put in
brik.yml - GitLab platform reference: runner images, variables, coverage badge
- Credentials: wiring secrets for publish and deploy, signing credential isolation
- Troubleshooting: common failures and fixes