File tree Expand file tree Collapse file tree 5 files changed +35
-0
lines changed
Expand file tree Collapse file tree 5 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ gitlab_runner_runners:
112112 token: 'abcd'
113113 # url is an optional override to the global gitlab_runner_coordinator_url
114114 url: 'https://my-own-gitlab.mydomain.com'
115+ request_concurrency: 2
115116 executor: docker
116117 docker_image: 'alpine'
117118 tags:
Original file line number Diff line number Diff line change @@ -154,6 +154,9 @@ gitlab_runner_runners:
154154 # Maximum number of jobs to run concurrently on this specific runner.
155155 # Defaults to 0, simply means don't limit.
156156 concurrent_specific : " 0"
157+ # Limits concurrent HTTP requests to GitLab API per runner configuration
158+ # See at https://support.gitlab.com/hc/en-us/articles/21324350882076-GitLab-Runner-Concurrency-Tuning-Understanding-request-concurrency
159+ # request_concurrency:
157160 # The default Docker image to use. Required when executor is `docker`.
158161 docker_image : " "
159162 # Set to override the default helper image that is used.
Original file line number Diff line number Diff line change 2121 check_mode : false
2222 notify : restart_gitlab_runner_windows
2323
24+ - name : " Set request concurrency option {{ runn_name_prefix }}"
25+ community.windows.win_lineinfile :
26+ dest : " {{ temp_runner_config.path }}"
27+ regexp : ^\s*request_concurrency =
28+ line : " request_concurrency = {{ gitlab_runner.request_concurrency }}"
29+ state : present
30+ insertafter : ^\s*limit =
31+ backrefs : false
32+ check_mode : false
33+ notify :
34+ - restart_gitlab_runner_windows
35+ when : gitlab_runner.request_concurrency is defined
36+
2437- name : " Set coordinator URL {{ runn_name_prefix }}"
2538 community.windows.win_lineinfile :
2639 dest : " {{ temp_runner_config.path }}"
Original file line number Diff line number Diff line change 1313 - restart_gitlab_runner
1414 - restart_gitlab_runner_macos
1515
16+ - name : " Set request concurrency option {{ runn_name_prefix }}"
17+ ansible.builtin.lineinfile :
18+ dest : " {{ temp_runner_config.path }}"
19+ regexp : ^\s*request_concurrency =
20+ line : " request_concurrency = {{ gitlab_runner.request_concurrency }}"
21+ state : present
22+ insertafter : ^\s*limit =
23+ backrefs : false
24+ check_mode : false
25+ no_log : " {{ gitlab_runner_no_log_secrets | default(false) }}"
26+ notify :
27+ - restart_gitlab_runner
28+ - restart_gitlab_runner_macos
29+ when : gitlab_runner.request_concurrency is defined
30+
1631- name : " Set coordinator URL {{ runn_name_prefix }}"
1732 ansible.builtin.lineinfile :
1833 dest : " {{ temp_runner_config.path }}"
Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ sentry_dsn = "{{ gitlab_runner_sentry_dsn }}"
3131[[runners]]
3232 name = {{ gitlab_runner.name | tojson }}
3333 limit = {{ gitlab_runner.concurrent_specific | default(0) }}
34+ {% if gitlab_runner .request_concurrency is defined %}
35+ request_concurrency = {{ gitlab_runner.request_concurrency | tojson }}
36+ {% endif %}
3437 url = {{ gitlab_runner.url | default(gitlab_runner_coordinator_url) | tojson }}
3538{% if gitlab_runner .clone_url is defined %}
3639 clone_url = {{ gitlab_runner.clone_url | tojson }}
You can’t perform that action at this time.
0 commit comments