Skip to content
This repository was archived by the owner on Jun 16, 2024. It is now read-only.

Commit 86495cd

Browse files
committed
Look for gitlab-runner in /usr/local/bin as well
1 parent fbbd4ad commit 86495cd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

prepare.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ start_container() {
6565

6666
install_dependencies() {
6767
# Copy gitlab-runner binary from the server into the container
68-
podman cp --pause=false /usr/bin/gitlab-runner "$CONTAINER_ID":/usr/bin/gitlab-runner
68+
if [ -x /usr/local/bin/gitlab-runner ]; then
69+
podman cp --pause=false /usr/local/bin/gitlab-runner "$CONTAINER_ID":/usr/bin/gitlab-runner
70+
else
71+
podman cp --pause=false /usr/bin/gitlab-runner "$CONTAINER_ID":/usr/bin/gitlab-runner
72+
fi
6973

7074
# Install bash in systems with APK (e.g., Alpine)
7175
podman exec "$CONTAINER_ID" sh -c 'if ! type bash >/dev/null 2>&1 && type apk >/dev/null 2>&1 ; then echo "APK based distro without bash"; apk add bash; fi'

0 commit comments

Comments
 (0)