Move or disable a runner
Put a self-hosted runner into another runner group, or stop trusting it by revoking its credential.
Replace runner-id with the runner's id and group-id with the group's id.
Prerequisites
ci:ManageRunnerson all of CI (rn:ews::<organization id>:ci:*). Runners belong to the organization, not to a repository, so the action is checked on the whole service. Without it the console's row menu says "Needs ci:ManageRunners".- In the console, also
ci:DescribeRunnerson all of CI to open Runners; without it the page shows an access-denied notice.
Move a runner to another group
- Open Runners under CI.
- In the runner's row menu, choose Move to group.
- Choose the group, or Default.
- Choose Move.
dcloud ci runners set-group runner-id --group-id group-idPATCH /ci/api/runners/runner-id
{ "groupId": "8a3e2c1d-4b5f-4e6a-9c7d-0e1f2a3b4c5d" }"groupId": null moves the runner to Default.
The runner takes only the runs its new group allows, from its next claim on. 404 answers a runner
or a group that is not in your organization; "Runner group not found" names the group.
Disable a runner
Disabling revokes the runner's credential: the machine stops taking work and cannot reconnect. The runner stays listed, so past runs still name the machine that ran them. It cannot be enabled again; register the machine anew with a new token instead (see Register a runner).
- Open Runners under CI.
- In the runner's row menu, choose Disable runner.
- Choose Disable.
The runner's status turns Disabled, and its row has no menu from then on.
dcloud ci runners disable runner-idDELETE /ci/api/runners/runner-idThe answer is 200 with the runner, status disabled; disabling it again answers 200 too.
Jobs that need its labels wait for another runner, and fail after 20 minutes if no runner with
those labels is online.
Uninstalling the runner software from the machine does not remove it from the list: disable it here as well.