jenkins

package
v0.2.2-buildfails Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package jenkins implements some helper functions to use during tests. Many times certain facilities are not available, or tests must run differently.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTag

func BuildTag() string

BuildTag returns the jenkins BUILD_TAG.

func Env

func Env(v EnvVar) string

Env returns the value of a travis env variable.

func IsRunning

func IsRunning() bool

IsRunning attempts to determine whether this process is running on Jenkins CI. This is done by checking any of the following:

JENKINS_URL is set
BuildTag has prefix "jenkins-"

func JobName

func JobName() string

JobName returns the jenkins JOB_NAME of this build.

Types

type EnvVar

type EnvVar string

EnvVar is a type to use travis-only env var names with the type system.

const (
	VarBuildNumber    EnvVar = "BUILD_NUMBER"
	VarBuildId        EnvVar = "BUILD_ID"
	VarBuildUrl       EnvVar = "BUILD_URL"
	VarNodeName       EnvVar = "NODE_NAME"
	VarJobName        EnvVar = "JOB_NAME"
	VarBuildTag       EnvVar = "BUILD_TAG"
	VarJenkinsUrl     EnvVar = "JENKINS_URL"
	VarExecutorNumber EnvVar = "EXECUTOR_NUMBER"
	VarJavaHome       EnvVar = "JAVA_HOME"
	VarWorkspace      EnvVar = "WORKSPACE"
	VarSvnRevision    EnvVar = "SVN_REVISION"
	VarCvsBranch      EnvVar = "CVS_BRANCH"
	VarGitCommit      EnvVar = "GIT_COMMIT"
	VarGitUrl         EnvVar = "GIT_URL"
	VarGitBranch      EnvVar = "GIT_BRANCH"
)

Environment variables that Jenkins uses.

Jump to

Keyboard shortcuts

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