File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 4343 # and this for non-interactive mode:
4444 # https://gitlab.com/gitlab-org/gitlab-runner/blob/master/docs/commands/README.md#non-interactive-registration
4545 - name : Register Gitlab-Runners using shell executor
46- shell : " gitlab-runner register --non-interactive --url '{{gitlab_url}}' --registration-token '{{gitlab_runner_registration_token}}' --description '{{ item.name }}' --executor shell"
47- with_items :
48- - { name: shell-runner-1 }
49- - { name: shell-runner-2 }
50- - { name: shell-runner-3 }
51- - { name: shell-runner-4 }
52- - { name: shell-runner-5 }
46+ shell : " gitlab-runner register --non-interactive --url '{{gitlab_url}}' --registration-token '{{gitlab_runner_registration_token}}' --description 'shell-runner-{{ item }}' --executor shell"
47+ loop : " {{ range(1,gitlab_runner_count + 1)|list }}"
5348
5449 # number of concurrent runners needs to be set directly in config-file in order to actually run jobs in parallel
5550 # see: https://gitlab.com/gitlab-org/gitlab-runner/issues/1539
5853 path : /etc/gitlab-runner/config.toml
5954 section :
6055 option : concurrent
61- value : 5
56+ value : " {{ gitlab_runner_count }} "
6257
6358 - name : Retrieve all registered Gitlab Runners
6459 shell : " gitlab-runner list"
Original file line number Diff line number Diff line change 66 gitlab_domain : " gitlab.jonashackt.io"
77 gitlab_url : " https://{{ gitlab_domain }}"
88 gitlab_registry_url : " {{ gitlab_url }}:4567"
9+ gitlab_runner_count : 5
910
1011 tasks :
1112
You can’t perform that action at this time.
0 commit comments