chore: update gitlab-ci.yml and only load job deps if name was passed to setup_nix_ci

This commit is contained in:
technofab 2024-03-17 18:16:34 +01:00
parent 12e55ad0b7
commit 93baeca411
2 changed files with 12 additions and 7 deletions

View file

@ -80,11 +80,15 @@
$NIX_EXTRA_CONF
"
echo -e "\\e[0Ksection_end:`date +%s`:nix_setup\\r\\e[0K"
echo -e "\\e[0Ksection_start:`date +%s`:nix_deps[collapsed=true]\\r\\e[0KFetching deps for job"
nix build .#gitlab-ci-job-deps:$1
source $(readlink -f result)
echo -e "\\e[0Ksection_end:`date +%s`:nix_deps\\r\\e[0K"
${
"" # load the job's deps only if the name was passed
}
if [[ ! -z $1 ]]; then
echo -e "\\e[0Ksection_start:`date +%s`:nix_deps[collapsed=true]\\r\\e[0KFetching deps for job"
nix build .#gitlab-ci-job-deps:$1
source $(readlink -f result)
echo -e "\\e[0Ksection_end:`date +%s`:nix_deps\\r\\e[0K"
fi
'';
finalizeScript = push_command:
pkgs.writeShellScriptBin "finalize_nix_ci" ''