Skip to content

Commit 54c10f3

Browse files
feat: Skip runner download and install if it's already done (#446)
Co-authored-by: Steve Wilson <[email protected]>
1 parent 5beb9d7 commit 54c10f3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

template/gitlab-runner.tpl

+5-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ then
3434
yum install amazon-ecr-credential-helper -y
3535
fi
3636

37-
curl --fail --retry 6 -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | bash
38-
yum install gitlab-runner-${gitlab_runner_version} -y
37+
if ! ( rpm -q gitlab-runner >/dev/null )
38+
then
39+
curl --fail --retry 6 -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | bash
40+
yum install gitlab-runner-${gitlab_runner_version} -y
41+
fi
3942

4043
if [[ `echo ${docker_machine_download_url}` == "" ]]
4144
then

0 commit comments

Comments
 (0)