mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2025-12-11 17:50:08 +01:00
chore(template): skip checking if pipeline exists, just fail if not
This commit is contained in:
parent
36c4fc0fd6
commit
7a40a68a10
1 changed files with 1 additions and 2 deletions
|
|
@ -72,8 +72,7 @@ nix-ci:build:
|
|||
- 'if [ -z "$CACHED" ]; then source setup_nix_ci; fi'
|
||||
script:
|
||||
# build the generated-gitlab-ci.yml if it does not exist in the cache
|
||||
- 'if [ -z "$CACHED" ]; then nix eval --json ".#gitlab-ci:pipeline:${_NIX_CI_PIPELINE_NAME}" &>/dev/null && _NAME=$_NIX_CI_PIPELINE_NAME || _NAME="default"; fi'
|
||||
- 'if [ -z "$CACHED" ]; then nix build .#gitlab-ci:pipeline:${_NAME} && install result generated-gitlab-ci.yml; fi'
|
||||
- 'if [ -z "$CACHED" ]; then nix build .#gitlab-ci:pipeline:${_NIX_CI_PIPELINE_NAME} && install result generated-gitlab-ci.yml; fi'
|
||||
after_script:
|
||||
# save to binary cache or Gitlab CI cache only if we actually built something
|
||||
# check if /tmp/nix-store-before exists as $CACHED never exists here and the file only exists if "setup_nix_ci" is called
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue