Open zagy opened 1 year ago
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.
dockerVolumes = [
"/nix/store:/nix/store:ro"
]
The option
services.gitlab-runner.services.<name>.preBuildScript
is 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
preBuildScript
is written to. The error is e.g.FTR: A workaround is
registrationFlags = [ "--pre-build-script 'my; commands; go ; here'" ];
.@zimbatm @bachp @globin