feat: customizable CI stages

This commit is contained in:
Alessio Caiazza 2025-07-08 09:30:02 +02:00
parent dca2d724c1
commit 625fe732b5

View file

@ -23,10 +23,18 @@ spec:
type: string
description: |
Which version of the Nix CI image to use. Using a tag/version is recommended.
stage_build:
type: string
description: The CI stage for building the dynamic pipeline.
default: build
stage_trigger:
type: string
description: The CI stage for triggering the dynamic pipeline.
default: trigger
---
stages:
- build
- trigger
- $[[ inputs.stage_build ]]
- $[[ inputs.stage_trigger ]]
variables:
# These can be overriden, see https://docs.gitlab.com/ci/variables/#cicd-variable-precedence
# which image should be used by default.
@ -34,7 +42,7 @@ variables:
# default cache stategy
NIX_CI_CACHE_STRATEGY: $[[ inputs.cache_strategy ]]
nix-ci:build:
stage: build
stage: $[[ inputs.stage_build ]]
image: $NIX_CI_IMAGE
cache:
- key:
@ -92,7 +100,7 @@ nix-ci:build:
dotenv: trigger.env
nix-ci:trigger:
stage: trigger
stage: $[[ inputs.stage_trigger ]]
needs:
- nix-ci:build
trigger: