Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type System ¶
type System string
System is a recognized CI system.
const ( AppVeyor System = "AppVeyor" AWSCodeBuild System = "AWS CodeBuild" AtlassianBamboo System = "Atlassian Bamboo" AtlassianBitbucketPipelines System = "Atlassian Bitbucket Pipelines" Buildkite System = "Buildkite" CircleCI System = "CircleCI" Codeship System = "Codeship" Drone System = "Drone" GitHub System = "GitHub" GitLab System = "GitLab" GoCD System = "GoCD" Hudson System = "Hudson" Jenkins System = "Jenkins" MagnumCI System = "Magnum CI" MicrosoftTFS System = "Microsoft Team Foundation Server" Semaphore System = "Semaphore" TaskCluster System = "TaskCluster" TeamCity System = "TeamCity" Travis System = "Travis CI" )
func DetectSystem ¶
func DetectSystem() System
DetectSystem returns a CI system name when the current system looks like a CI system. Detection is based on environment variables that CI vendors we know about set.
type Vars ¶
type Vars struct {
// Name is a required friendly name of the CI system.
Name System
// 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
}
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.
Click to show internal directories.
Click to hide internal directories.