Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SystemName ¶ added in v0.17.15
type SystemName string
SystemName is a recognized CI system.
const ( AppVeyor SystemName = "AppVeyor" AWSCodeBuild SystemName = "AWS CodeBuild" AtlassianBamboo SystemName = "Atlassian Bamboo" AtlassianBitbucketPipelines SystemName = "Atlassian Bitbucket Pipelines" AzurePipelines SystemName = "Azure Pipelines" Buildkite SystemName = "Buildkite" CircleCI SystemName = "CircleCI" Codeship SystemName = "Codeship" Drone SystemName = "Drone" // GenericCI is used when a CI system in which the CLI is being run, // is not recognized by it. Users can set the relevant env vars // as a fallback so that the CLI would still pick-up the metadata related // to their CI build. GenericCI SystemName = "Generic CI" GitHub SystemName = "GitHub" GitLab SystemName = "GitLab" GoCD SystemName = "GoCD" Hudson SystemName = "Hudson" Jenkins SystemName = "Jenkins" MagnumCI SystemName = "Magnum CI" Semaphore SystemName = "Semaphore" TaskCluster SystemName = "TaskCluster" TeamCity SystemName = "TeamCity" Travis SystemName = "Travis CI" )
CI system constants.
type Vars ¶
type Vars struct { // Name is a required friendly name of the CI system. Name SystemName // BuildID is an optional unique identifier for the current build/job. BuildID string // BuildType is an optional friendly type name of the build/job type. BuildType string // BuildURL is an optional URL for this build/job's webpage. BuildURL string // SHA is the SHA hash of the code repo at which this build/job is running. SHA string // BranchName is the name of the feature branch currently being built. BranchName string // CommitMessage is the full message of the Git commit being built. CommitMessage string // PRNumber is the pull-request ID/number in the source control system. PRNumber string }
Vars contains a set of metadata variables about a CI system.
func DetectVars ¶
func DetectVars() Vars
DetectVars detects and returns the CI variables for the current environment. Not all fields of the `Vars` struct are applicable to every CI system, and may be left blank.
Click to show internal directories.
Click to hide internal directories.