Runners¶
Runners are external processes used to run CI jobs. They are deployed by the administrator and registered to the GitLab instance.
Shared runners are available for all projects. Specific runners are enabled for a list of projects.
Global runners (admin)¶
Reference¶
v4 API:
gitlab.Gitlab.runners
GitLab API: https://docs.gitlab.com/ce/api/runners.html
Examples¶
Use the list() and all() methods to list runners.
Both methods accept a scope parameter to filter the list. Allowed values for this parameter are:
active
paused
online
specific (all() only)
shared (all() only)
Note
The returned objects hold minimal information about the runners. Use the get() method to retrieve detail about a runner.
Get a runner’s detail:
Register a new runner:
Update a runner:
Remove a runner:
Verify a registered runner token:
Project runners¶
Reference¶
v4 API:
gitlab.v4.objects.Project.runners
GitLab API: https://docs.gitlab.com/ce/api/runners.html
Examples¶
List the runners for a project:
Enable a specific runner for a project:
Disable a specific runner for a project:
Runner jobs¶
Reference¶
v4 API:
gitlab.v4.objects.Runner.jobs
GitLab API: https://docs.gitlab.com/ce/api/runners.html
Examples¶
List for jobs for a runner:
Filter the list using the jobs status: