@@ -199,37 +199,38 @@ then
199199fi
200200
201201if [[ " ${ runners_executor } " == " docker-autoscaler" ]]; then
202- echo " installing docker "
202+ echo " Installing Docker by autoscaler "
203203 yum install docker - y
204204 usermod - a - G docker ec2- user
205205 service docker start
206206
207- echo " Installing Docker fleeting plugin "
208- # Determine architecture
209- if [[ " $(uname -m)" == " x86_64" ]]; then
210- ARCH= " amd64"
211- elif [[ " $(uname -m)" == " i686" ]]; then
212- ARCH= " 386"
213- elif [[ " $(uname -m)" == " armv7l" ]]; then
214- ARCH= " arm"
215- elif [[ " $(uname -m)" == " aarch64" ]]; then
216- ARCH= " arm64"
217- else
218- echo " Unsupported architecture"
219- exit 1
220- fi
207+ if [[ " ${ use_new_fleeting_install } " == " false " ]]; then
208+ # Determine architecture
209+ if [[ " $(uname -m)" == " x86_64" ]]; then
210+ ARCH= " amd64"
211+ elif [[ " $(uname -m)" == " i686" ]]; then
212+ ARCH= " 386"
213+ elif [[ " $(uname -m)" == " armv7l" ]]; then
214+ ARCH= " arm"
215+ elif [[ " $(uname -m)" == " aarch64" ]]; then
216+ ARCH= " arm64"
217+ else
218+ echo " Unsupported architecture"
219+ exit 1
220+ fi
221221
222- wget " https://gitlab.com/gitlab-org/fleeting/plugins/aws/-/releases/v${ fleeting_plugin_version } /downloads/fleeting-plugin-aws-$(uname -s | tr '[:upper:]' '[:lower:]')-$ARCH"
223- chmod + x fleeting- plugin- aws-*
224- mv fleeting- plugin- aws-* / bin/ fleeting- plugin- aws
222+ echo " Installing Docker fleeting-plugin-aws manually"
223+ wget " https://gitlab.com/gitlab-org/fleeting/plugins/aws/-/releases/v${ fleeting_plugin_version } /downloads/fleeting-plugin-aws-$(uname -s | tr '[:upper:]' '[:lower:]')-$ARCH"
224+ chmod + x fleeting- plugin- aws-*
225+ mv fleeting- plugin- aws-* / bin/ fleeting- plugin- aws
226+ fi
225227
226228 mkdir ~/ .aws
227229 cat << EOF > ~/ .aws/ config
228230[default]
229231region = " ${ aws_region } "
230232
231233EOF
232-
233234fi
234235
235236# A small script to remove this runner from being registered with Gitlab. Executed at shutdown.
@@ -297,6 +298,10 @@ if ! ( rpm -q gitlab-runner >/dev/null )
297298then
298299 curl -- fail -- retry 6 - L https: // packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | bash
299300 yum install gitlab- runner- ${gitlab_runner_version} - y
301+ if [[ " ${ runners_executor } " == " docker-autoscaler" ]] && [[ " ${ use_new_fleeting_install } " == " true" ]]; then
302+ echo " Installing gitlab-runner fleeting plugin"
303+ gitlab- runner fleeting install
304+ fi
300305fi
301306
302307# ############################
0 commit comments