You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The option services.gitlab-runner.services.<name>.preBuildScript is defined as null or path.
The option defines the commands to be executed before the build itself, not a path to a script. From the gitlab-runner docs:
pre_build_script: Commands to be executed on the runner before executing the build. To insert multiple commands, use a (triple-quoted) multi-line string or \n character.
The problem becomes clear when the build is run in a container (e.g. docker): the commands are run inside the container which has no access to the nix store where the preBuildScript is written to. The error is e.g.
/bin/bash: line 129: /nix/store/13is9j57jrc177rb9268lyaaigmsq2bx-gitlab-runner-docker-dind-pre-build: No such file or directory
FTR: A workaround is registrationFlags = [ "--pre-build-script 'my; commands; go ; here'" ];.
A path to a script should be valid as a "command." I think the problem is your script path is not available inside the container. You could try mounting the host's nix store in your runner service.
The option
services.gitlab-runner.services.<name>.preBuildScriptis defined asnull or path.The option defines the commands to be executed before the build itself, not a path to a script. From the gitlab-runner docs:
The problem becomes clear when the build is run in a container (e.g. docker): the commands are run inside the container which has no access to the nix store where the
preBuildScriptis written to. The error is e.g.FTR: A workaround is
registrationFlags = [ "--pre-build-script 'my; commands; go ; here'" ];.@zimbatm @bachp @globin
The text was updated successfully, but these errors were encountered: