Documentation ¶
Index ¶
- Constants
- func GetBranchName() string
- func GetBranchNameFromLabels(m map[string]string) string
- func GetBuildNumber() string
- func GetBuildNumberFromLabels(m map[string]string) string
- func GetBuildNumberFromLabelsWithKeys(m map[string]string, keys ...string) string
- func GetValueFromLabels(m map[string]string, keys ...string) string
- func LoadDownwardAPILabels(text string) map[string]string
Constants ¶
View Source
const ( // EnvVarBranchName is the environment variable that will hold the name of the branch being built during pipelines EnvVarBranchName = "BRANCH_NAME" // LabelPipelineRunName the label used on a pod created via Build Pipeline for the build name. LabelPipelineRunName = "tekton.dev/pipelineRun" )
Variables ¶
This section is empty.
Functions ¶
func GetBranchName ¶
func GetBranchName() string
GetBranchName returns the branch name using environment variables and/or pod Downward API
func GetBranchNameFromLabels ¶
GetBranchNameFromLabels returns the branch name from the given pod labels
func GetBuildNumber ¶
func GetBuildNumber() string
GetBuildNumber returns the build number using environment variables and/or pod Downward API files
func GetBuildNumberFromLabels ¶
GetBuildNumberFromLabels returns the
func GetBuildNumberFromLabelsWithKeys ¶
GetBuildNumberFromLabelsWithKeys returns the build number from the given Pod labels
func GetValueFromLabels ¶
GetValueFromLabels returns the first label with the given key
func LoadDownwardAPILabels ¶
LoadDownwardAPILabels parses the /etc/podinfo/labels text into a map of label values
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.