Install Runner in /usr/bin and helper in /usr/lib in Linux
What does this MR do?
This MR changes the .deb and .rpm packages so that they install the Runner binary directly in /usr/bin
instead of /usr/lib/gitlab-runner
with a symlink on /usr/bin
. A symlink to /usr/bin/gitlab-runner
is now placed at the old location /usr/lib/gitlab-runner
. An issue to remove this symlink at the next major version was created in #26651 (closed).
Why was this MR needed?
See #3440 (closed) and #22963 (closed)
What's the best way to test this MR?
I've tested installing the previous package in a Fedora 28 VM, and then upgrading to the new version with sudo yum localinstall
, and the /etc/systemd/system/gitlab-runner.service
file was updated to point to /usr/bin/gitlab-runner
as expected. The symlink was also correctly updated from:
to:
Previous version failed to check for new builds with:
status=couldn't execute POST against https://gitlab.com/api/v4/jobs/request: Post https://gitlab.com/api/v4/jobs/request: dial tcp 172.65.251.78:443: connect: permission denied
As soon as I updated to the new Runner, the job was picked up and completed successfully with the docker
executor.
Steps to test
On a Fedora 28 VM:
-
Check that SELinux is in Enforcing mode:
$ /usr/sbin/getenforce Enforcing
-
Install Docker
sudo dnf install -y moby-engine sudo systemctl start docker sudo gpasswd -a $USER docker sudo setfacl -m user:$USER:rw /var/run/docker.sock
-
Install current gitlab-runner RPM package (not from this MR) to verify broken behaviour
sudo yum localinstall -y gitlab-runner_amd64.rpm
-
Register runner and run a build against this runner.
-
Install RPM package from this MR, and after it upgrades, retry the build. It should complete just fine.
What are the relevant issue numbers?
Closes #3440 (closed)