From 39545cc6755bfee1246b102004dbbd3f141de8b8 Mon Sep 17 00:00:00 2001 From: Steve Wilson Date: Wed, 23 Feb 2022 22:12:36 +0000 Subject: [PATCH] Skip runner download and install if it's already done --- template/gitlab-runner.tpl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/template/gitlab-runner.tpl b/template/gitlab-runner.tpl index 78bf9a60f..8c753ead8 100644 --- a/template/gitlab-runner.tpl +++ b/template/gitlab-runner.tpl @@ -28,8 +28,11 @@ then yum install amazon-ecr-credential-helper -y fi -curl --fail --retry 6 -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | bash -yum install gitlab-runner-${gitlab_runner_version} -y +if ! ( rpm -q gitlab-runner >/dev/null ) +then + curl --fail --retry 6 -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | bash + yum install gitlab-runner-${gitlab_runner_version} -y +fi if [[ `echo ${docker_machine_download_url}` == "" ]] then