When I enable gitlab-runner and trigger a build from gitlab I get the following error:
Failed to start process: exec: "su": executable file not found in $PATH
I was able to fix this by adding the following to my configuration.nix:
systemd.services.gitlab-runner.path = [ "/run/wrappers" ];
But a different approach should probably be used to fix services.gitlab-runner out of the box.
Add the following to configuration.nix:
services.gitlab-runner = {
enable = true;
configFile = /path/to/config.toml;
};
You can also use an appropriate configOptions field instead of configFile. Get it connected to a gitlab project and trigger a build. The build immediately fails with the above error message.
"x86_64-linux"Linux 4.14.76, NixOS, 18.09.910.c15e342304a (Jellyfish)yesyesnix-env (Nix) 2.1.1/nix/var/nix/profiles/per-user/root/channels/nixos@mightybyte What executor are you using? I'm only tested this with the docker executor recently.
I was using the shell executor.
I'm hitting an identical issue, identical setup. Docker executor runs well, but not exactly what I need.
The workaround listed also allows me to use shell.
Bump, this needs a fix asap. I can't figure out a way to use packages with path set.
In case anyone shows up here and wants an easy solution. I forked @arianvp 's work, so that it would work with the shell executor and be more specialized to nix based builds.
I faced the same error message and hotfixed it by adding pkgs.su.
So, I could run my nodejs tests using:
gitlab-runner = {
enable = true;
configFile = /etc/gitlab-runner/config.toml;
packages = [ pkgs.bash pkgs.su pkgs.nodejs-12_x ];
};
I hope it may save time for someone.
If anyone's still hitting this issue:
systemd.services.gitlab-runner.path = [ "/run/wrappers" ];
solves the problem.
Hello, I'm a bot and I thank you in the name of the community for opening this issue.
To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.
The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.
If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.
Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.
Most helpful comment
If anyone's still hitting this issue:
systemd.services.gitlab-runner.path = [ "/run/wrappers" ];solves the problem.