Documentation ¶
Overview ¶
downwardapi declares the types used to expose job configuration to the jobs themselves
Index ¶
Constants ¶
View Source
const ( JobNameEnv = "JOB_NAME" JobSpecEnv = "JOB_SPEC" JobTypeEnv = "JOB_TYPE" ProwJobIdEnv = "PROW_JOB_ID" BuildIdEnv = "BUILD_ID" // Deprecated, will be removed in the future. ProwBuildIdEnv = "BUILD_NUMBER" // Deprecated, will be removed in the future. JenkinsBuildIdEnv = "buildId" RepoOwnerEnv = "REPO_OWNER" RepoNameEnv = "REPO_NAME" PullBaseRefEnv = "PULL_BASE_REF" PullBaseShaEnv = "PULL_BASE_SHA" PullRefsEnv = "PULL_REFS" PullNumberEnv = "PULL_NUMBER" PullPullShaEnv = "PULL_PULL_SHA" )
Variables ¶
This section is empty.
Functions ¶
func EnvForSpec ¶
EnvForSpec returns a mapping of environment variables to their values that should be available for a job spec
func EnvForType ¶
func EnvForType(jobType kube.ProwJobType) []string
Types ¶
type JobSpec ¶
type JobSpec struct { Type kube.ProwJobType `json:"type,omitempty"` Job string `json:"job,omitempty"` BuildId string `json:"buildid,omitempty"` ProwJobId string `json:"prowjobid,omitempty"` Refs kube.Refs `json:"refs,omitempty"` // contains filtered or unexported fields }
JobSpec is the full downward API that we expose to jobs that realize a ProwJob. We will provide this data to jobs with environment variables in two ways:
- the full spec, in serialized JSON in one variable
- individual fields of the spec in their own variables
func NewJobSpec ¶
func NewJobSpec(spec kube.ProwJobSpec, buildId, prowJobId string) JobSpec
func ResolveSpecFromEnv ¶
ResolveSpecFromEnv will determine the Refs being tested in by parsing Prow environment variable contents
Click to show internal directories.
Click to hide internal directories.