Skip to content
Snippets Groups Projects
Commit f0f5fdfd authored by Gabriel Martinez's avatar Gabriel Martinez
Browse files

Add limit option for specific runner

parent 69ccc996
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ Role Variables ...@@ -16,7 +16,7 @@ Role Variables
**Since Gitlab 10.x** The package name of `gitlab-ci-multi-runner` has been renamed to `gitlab-runner`. In order to install a version >= 10.x you will need to define this variable `gitlab_runner_package_name: gitlab-runner`. **Since Gitlab 10.x** The package name of `gitlab-ci-multi-runner` has been renamed to `gitlab-runner`. In order to install a version >= 10.x you will need to define this variable `gitlab_runner_package_name: gitlab-runner`.
`gitlab_runner_concurrent` `gitlab_runner_concurrent`
The maximum number of jobs to run concurrently. The maximum number of global jobs to run concurrently.
Defaults to the number of processor cores. Defaults to the number of processor cores.
`gitlab_runner_registration_token` `gitlab_runner_registration_token`
...@@ -34,6 +34,10 @@ Defaults to the hostname. ...@@ -34,6 +34,10 @@ Defaults to the hostname.
The executor used by the runner. The executor used by the runner.
Defaults to `shell`. Defaults to `shell`.
`gitlab_runner_concurrent_specific`
The maximum number of jobs to run concurrently on this specific runner.
Defaults to 0, simply means don't limit.
`gitlab_runner_docker_image` `gitlab_runner_docker_image`
The default Docker image to use. Required when executor is `docker`. The default Docker image to use. Required when executor is `docker`.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Change this variable value to 'gitlab-runner' for versions >= 10.x # Change this variable value to 'gitlab-runner' for versions >= 10.x
gitlab_runner_package_name: 'gitlab-ci-multi-runner' gitlab_runner_package_name: 'gitlab-ci-multi-runner'
# Maximum number of jobs to run concurrently # Maximum number of global jobs to run concurrently
gitlab_runner_concurrent: '{{ ansible_processor_vcpus }}' gitlab_runner_concurrent: '{{ ansible_processor_vcpus }}'
# GitLab coordinator URL # GitLab coordinator URL
...@@ -13,6 +13,8 @@ gitlab_runner_registration_token: '' ...@@ -13,6 +13,8 @@ gitlab_runner_registration_token: ''
gitlab_runner_description: '{{ ansible_hostname }}' gitlab_runner_description: '{{ ansible_hostname }}'
# Runner executor # Runner executor
gitlab_runner_executor: 'shell' gitlab_runner_executor: 'shell'
# Maximum number of jobs to run concurrently on this specific runner
gitlab_runner_concurrent_specific: '0'
# Default Docker image # Default Docker image
gitlab_runner_docker_image: '' gitlab_runner_docker_image: ''
# Runner tags # Runner tags
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
--description '{{ gitlab_runner_description }}' --description '{{ gitlab_runner_description }}'
--tag-list '{{ gitlab_runner_tags | join(",") }}' --tag-list '{{ gitlab_runner_tags | join(",") }}'
--executor '{{ gitlab_runner_executor }}' --executor '{{ gitlab_runner_executor }}'
--limit '{{ gitlab_runner_concurrent_specific }}'
--locked='{{gitlab_runner_locked}}' --locked='{{gitlab_runner_locked}}'
--docker-image '{{ gitlab_runner_docker_image }}' --docker-image '{{ gitlab_runner_docker_image }}'
{% if gitlab_runner_docker_volumes is defined %} {% if gitlab_runner_docker_volumes is defined %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment