From 7a40a68a10fe936847b414093f350e826342ce2d Mon Sep 17 00:00:00 2001 From: technofab Date: Fri, 28 Feb 2025 11:54:41 +0100 Subject: [PATCH] chore(template): skip checking if pipeline exists, just fail if not --- templates/nix-gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/nix-gitlab-ci.yml b/templates/nix-gitlab-ci.yml index 705d9aa..51b9670 100644 --- a/templates/nix-gitlab-ci.yml +++ b/templates/nix-gitlab-ci.yml @@ -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