mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 02:00:13 +01:00
Merge branch 'patch-1' into 'main'
feat: customizable CI stages See merge request TECHNOFAB/nix-gitlab-ci!13
This commit is contained in:
commit
2d615f91bc
1 changed files with 12 additions and 4 deletions
|
|
@ -23,10 +23,18 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
Which version of the Nix CI image to use. Using a tag/version is recommended.
|
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:
|
stages:
|
||||||
- build
|
- $[[ inputs.stage_build ]]
|
||||||
- trigger
|
- $[[ inputs.stage_trigger ]]
|
||||||
variables:
|
variables:
|
||||||
# These can be overriden, see https://docs.gitlab.com/ci/variables/#cicd-variable-precedence
|
# These can be overriden, see https://docs.gitlab.com/ci/variables/#cicd-variable-precedence
|
||||||
# which image should be used by default.
|
# which image should be used by default.
|
||||||
|
|
@ -34,7 +42,7 @@ variables:
|
||||||
# default cache stategy
|
# default cache stategy
|
||||||
NIX_CI_CACHE_STRATEGY: $[[ inputs.cache_strategy ]]
|
NIX_CI_CACHE_STRATEGY: $[[ inputs.cache_strategy ]]
|
||||||
nix-ci:build:
|
nix-ci:build:
|
||||||
stage: build
|
stage: $[[ inputs.stage_build ]]
|
||||||
image: $NIX_CI_IMAGE
|
image: $NIX_CI_IMAGE
|
||||||
cache:
|
cache:
|
||||||
- key:
|
- key:
|
||||||
|
|
@ -92,7 +100,7 @@ nix-ci:build:
|
||||||
dotenv: trigger.env
|
dotenv: trigger.env
|
||||||
|
|
||||||
nix-ci:trigger:
|
nix-ci:trigger:
|
||||||
stage: trigger
|
stage: $[[ inputs.stage_trigger ]]
|
||||||
needs:
|
needs:
|
||||||
- nix-ci:build
|
- nix-ci:build
|
||||||
trigger:
|
trigger:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue