From 562c625aae8138b139ff03ec2b571d4d81216255 Mon Sep 17 00:00:00 2001 From: TBS093A Date: Fri, 10 Mar 2023 14:03:48 +0100 Subject: [PATCH] split up.all.sh on up.runners.sh --- gitlab/up.all.sh | 39 ++------------------------------------- gitlab/up.runners.sh | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 37 deletions(-) create mode 100755 gitlab/up.runners.sh diff --git a/gitlab/up.all.sh b/gitlab/up.all.sh index bb79bf8..849832e 100755 --- a/gitlab/up.all.sh +++ b/gitlab/up.all.sh @@ -1,41 +1,6 @@ source ./.env docker-compose up -d -sleep 360 - -message="" -index=0 -runner_id="" - -while [ $index -lt 3 ] -do - - if [ $index -lt 10 ]; then - - runner_id="00$index" - - elif [ $index -lt 100 ]; then - - runner_id="0$index" - - elif [ $index -lt 1000 ]; then - - runner_id="$index" - - fi - - echo "gitlab-runner-$runner_id configuration" - - docker exec -it gitlab-runner-$runner_id \ - gitlab-runner register \ - --non-interactive \ - --url $GITLAB_IP_OR_DNS/ \ - --registration-token $RUNNER_REGISTRATION_TOKEN \ - --description "gitlab-runner-$runner_id - docker images builder" \ - --executor "docker" \ - --docker-image ruby:latest - - index=$((($index+1))) - -done; +sleep 120 +./up.runners.sh diff --git a/gitlab/up.runners.sh b/gitlab/up.runners.sh new file mode 100755 index 0000000..801f6ca --- /dev/null +++ b/gitlab/up.runners.sh @@ -0,0 +1,37 @@ +source ./.env + +message="" +index=0 +runner_id="" + +while [ $index -lt 3 ] +do + + if [ $index -lt 10 ]; then + + runner_id="00$index" + + elif [ $index -lt 100 ]; then + + runner_id="0$index" + + elif [ $index -lt 1000 ]; then + + runner_id="$index" + + fi + + echo "gitlab-runner-$runner_id configuration" + + docker exec -it gitlab-runner-$runner_id \ + gitlab-runner register \ + --non-interactive \ + --url $GITLAB_IP_OR_DNS/ \ + --registration-token $RUNNER_REGISTRATION_TOKEN \ + --description "gitlab-runner-$runner_id - docker images builder" \ + --executor "docker" \ + --docker-image ruby:latest + + index=$((($index+1))) + +done; \ No newline at end of file