Skip to main content

runner

Gets or lists a runner resource.

Overview​

Namerunner
TypeResource
Idgitlab.ci.runner

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
idstringID of the runner.
access_levelstringAccess level of the runner. (NOT_PROTECTED, REF_PROTECTED)
admin_urlstringAdmin URL of the runner. Only available for administrators.
contacted_atstringTimestamp of last contact from the runner.
created_atstringTimestamp of creation of the runner.
creation_statestringRunner creation state. Used to determine if a runner has been registered and has contacted the GitLab instance. (STARTED, FINISHED)
descriptionstringDescription of the runner.
edit_admin_urlstringAdmin form URL of the runner. Only available for administrators.
job_execution_statusstringJob execution status of the runner. (IDLE, ACTIVE)
lockedbooleanIndicates the runner is locked.
maintenance_notestringRunner's maintenance notes.
maximum_timeoutintegerMaximum timeout (in seconds) for jobs processed by the runner.
pausedbooleanIndicates the runner is paused and not available to run jobs.
private_projects_minutes_cost_factornumberPrivate projects' "compute cost factor" associated with the runner (GitLab.com only).
public_projects_minutes_cost_factornumberPublic projects' "compute cost factor" associated with the runner (GitLab.com only).
register_admin_urlstringURL of the temporary registration page of the runner. Only available before the runner is registered. Only available for administrators.
run_untaggedbooleanIndicates the runner is able to run untagged jobs.
runner_typestringType of the runner. (INSTANCE_TYPE, GROUP_TYPE, PROJECT_TYPE)
short_shastringFirst eight characters of the runner's token used to authenticate new job requests. Used as the runner's unique ID.
statusstringStatus of the runner. (ONLINE, OFFLINE, STALE, NEVER_CONTACTED)
tag_listarray
token_expires_atstringRunner token expiration time.
upgrade_statusstringAvailability of upgrades for the runner. (INVALID, NOT_AVAILABLE, AVAILABLE, RECOMMENDED)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, hostFind a runner. Generated from the GitLab GraphQL schema field Query.runner (CiRunner).

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
hoststringGitLab host, with an optional port (default gitlab.com). Resolved from the GITLAB_HOST environment variable when it is set (x-stackQL-envVar); a WHERE host value always takes precedence. Self-managed instances: the provider is generated from the gitlab.com schema, so older instances may reject fields they do not serve. (default: gitlab.com, x-stackQL-envVar: GITLAB_HOST)
idstringRunner ID.

SELECT examples​

Find a runner. Generated from the GitLab GraphQL schema field Query.runner (CiRunner).

SELECT
id,
access_level,
admin_url,
contacted_at,
created_at,
creation_state,
description,
edit_admin_url,
job_execution_status,
locked,
maintenance_note,
maximum_timeout,
paused,
private_projects_minutes_cost_factor,
public_projects_minutes_cost_factor,
register_admin_url,
run_untagged,
runner_type,
short_sha,
status,
tag_list,
token_expires_at,
upgrade_status
FROM gitlab.ci.runner
WHERE id = '{{ id }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
;