Commit a4c64c41 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis Committed by Evan Read

Fix wrong docs on untagged jobs

parent 28aa4d33
...@@ -240,21 +240,64 @@ shared Runners will [only run the jobs they are equipped to run](../yaml/README. ...@@ -240,21 +240,64 @@ shared Runners will [only run the jobs they are equipped to run](../yaml/README.
For instance, at GitLab we have Runners tagged with "rails" if they contain For instance, at GitLab we have Runners tagged with "rails" if they contain
the appropriate dependencies to run Rails test suites. the appropriate dependencies to run Rails test suites.
### Preventing Runners with tags from picking jobs without tags ### Allowing Runners with tags to pick jobs without tags
You can configure a Runner to prevent it from picking When you [register a Runner][register], its default behavior is to **only pick**
[jobs with tags](../yaml/README.md#tags) when the Runner does not have tags [tagged jobs](../yaml/README.md#tags).
assigned. This setting can be enabled the first
time you [register a Runner][register] and can be changed afterwards under
each Runner's settings.
To make a Runner pick tagged/untagged jobs: NOTE: **Note:**
Maintainer [permissions](../../user/permissions.md) are required to change the
Runner settings.
1. Visit your project's **Settings ➔ CI/CD** To make a Runner pick untagged jobs:
1. Find the Runner you wish and make sure it's enabled
1. Click the pencil button 1. Visit your project's **Settings > CI/CD > Runners**.
1. Check the **Run untagged jobs** option 1. Find the Runner you want to pick untagged jobs and make sure it's enabled.
1. Click **Save changes** for the changes to take effect 1. Click the pencil button.
1. Check the **Run untagged jobs** option.
1. Click the **Save changes** button for the changes to take effect.
NOTE: **Note:**
The Runner tags list can not be empty when it's not allowed to pick untagged jobs.
Below are some example scenarios of different variations.
#### Runner runs only tagged jobs
The following examples illustrate the potential impact of the Runner being set
to run only tagged jobs.
Example 1:
1. The Runner is configured to run only tagged jobs and has the `docker` tag.
1. A job that has a `hello` tag is executed and stuck.
Example 2:
1. The Runner is configured to run only tagged jobs and has the `docker` tag.
1. A job that has a `docker` tag is executed and run.
Example 3:
1. The Runner is configured to run only tagged jobs and has the `docker` tag.
1. A job that has no tags defined is executed and stuck.
#### Runner is allowed to run untagged jobs
The following examples illustrate the potential impact of the Runner being set
to run tagged and untagged jobs.
Example 1:
1. The Runner is configured to run untagged jobs and has the `docker` tag.
1. A job that has no tags defined is executed and run.
1. A second job that has a `docker` tag defined is executed and run.
Example 2:
1. The Runner is configured to run untagged jobs and has no tags defined.
1. A job that has no tags defined is executed and run.
1. A second job that has a `docker` tag defined is stuck.
### Setting maximum job timeout for a Runner ### Setting maximum job timeout for a Runner
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment