mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-12 02:00:13 +01:00
chore: initial commit
This commit is contained in:
commit
0df36ad437
7 changed files with 768 additions and 0 deletions
36
gitlab-ci.yml
Normal file
36
gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
variables:
|
||||
# cachix | attic
|
||||
NIX_CI_CACHE_TYPE: cachix
|
||||
|
||||
stages:
|
||||
- build
|
||||
- trigger
|
||||
|
||||
nix-ci:build:
|
||||
stage: build
|
||||
image: nixos/nix:latest
|
||||
before_script:
|
||||
- echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
|
||||
- echo "accept-flake-config = true" >> /etc/nix/nix.conf
|
||||
script:
|
||||
# build the generated-gitlab-ci.yml
|
||||
- nix build .#gitlab-ci-config
|
||||
- install result generated-gitlab-ci.yml
|
||||
after_script:
|
||||
# upload to binary cache
|
||||
- echo $(nix-store --query --references result)
|
||||
# TODO: upload deps using cachix or attic
|
||||
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