mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 02:00:13 +01:00
feat: add CI Component template
This commit is contained in:
parent
533bd2eef5
commit
4e039a6b92
4 changed files with 49 additions and 6 deletions
38
templates/nix-gitlab-ci.yml
Normal file
38
templates/nix-gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
spec:
|
||||
inputs:
|
||||
image_tag:
|
||||
type: string
|
||||
description: "latest | latest-cachix | latest-attic etc."
|
||||
default: latest
|
||||
---
|
||||
|
||||
stages:
|
||||
- build
|
||||
- trigger
|
||||
|
||||
nix-ci:build:
|
||||
stage: build
|
||||
image: registry.gitlab.com/technofab/nix-gitlab-ci/nix-ci:$[[ inputs.image_tag ]]
|
||||
before_script:
|
||||
- source setup_nix_ci
|
||||
script:
|
||||
# build the generated-gitlab-ci.yml
|
||||
- nix build .#gitlab-ci-config
|
||||
- install result generated-gitlab-ci.yml
|
||||
after_script:
|
||||
# upload to binary cache
|
||||
- finalize_nix_ci
|
||||
artifacts:
|
||||
paths:
|
||||
- generated-gitlab-ci.yml
|
||||
|
||||
nix-ci:trigger:
|
||||
stage: trigger
|
||||
needs:
|
||||
- nix-ci:build
|
||||
trigger:
|
||||
include:
|
||||
- artifact: generated-gitlab-ci.yml
|
||||
job: nix-ci:build
|
||||
strategy: depend
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue