runnerinstall

package
v1.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package runnerinstall holds the steps for installing a CircleCI self-hosted runner on each supported platform, as documented at https://circleci.com/docs/runner/runner-overview/.

It renders instructions only. Nothing here runs a command, so the CLI never needs root and never changes the machine it runs on: the user decides where the agent is installed, which is often not the machine running the CLI.

Every command refers to the runner token through the RUNNER_AUTH_TOKEN environment variable rather than embedding it, so the instructions are safe to paste into a ticket or a log and the token stays out of shell history.

Index

Constants

View Source
const TokenEnvVar = "RUNNER_AUTH_TOKEN" //nolint:gosec // the variable's name, not a credential

TokenEnvVar is the environment variable every generated command reads the runner token from.

Variables

This section is empty.

Functions

func Labels

func Labels() []string

Labels returns the prompt label for each entry of Platforms, in the same order.

func Platforms

func Platforms() []string

Platforms returns the accepted --platform values, in prompt order.

Types

type Guide

type Guide struct {
	Platform Platform `json:"platform"`
	Title    string   `json:"title"`
	Steps    []Step   `json:"steps"`
	// JobConfig is a .circleci/config.yml that runs a job on the new runner.
	JobConfig string `json:"job_config"`
	// DocsURL is the CircleCI documentation page this guide follows.
	DocsURL string `json:"docs_url"`
}

Guide is the full set of instructions for one platform.

func Build

func Build(p Platform, opts Options) (Guide, error)

Build returns the install guide for platform p.

type Options

type Options struct {
	// ResourceClass is the runner resource class, as "namespace/name".
	ResourceClass string
}

Options is the input to Build.

type Platform

type Platform string

Platform is somewhere a runner agent can be installed.

const (
	// Debian is machine runner 3 on Debian or Ubuntu, from the apt package.
	Debian Platform = "debian"
	// RPM is machine runner 3 on RHEL, CentOS or Fedora, from the yum package.
	RPM Platform = "rpm"
	// MacOS is machine runner 3 on macOS, from Homebrew.
	MacOS Platform = "macos"
	// Windows is machine runner 3 on Windows Server, from the PowerShell installer.
	Windows Platform = "windows"
	// Docker is machine runner 3 in a container.
	Docker Platform = "docker"
	// Kubernetes is container runner, from the container-agent Helm chart.
	Kubernetes Platform = "kubernetes"
)

func Parse

func Parse(v string) (Platform, *clierrors.CLIError)

Parse validates a --platform value.

type Step

type Step struct {
	Title    string   `json:"title"`
	Commands []string `json:"commands,omitempty"`
	Note     string   `json:"note,omitempty"`
}

Step is one stage of an install: a title, the commands to run, and an optional note for anything a command cannot express.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL