builds

package
v3.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

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

func GetBranchNameFromLabels(m map[string]string) string

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

func GetBuildNumberFromLabels(m map[string]string) string

GetBuildNumberFromLabels returns the

func GetBuildNumberFromLabelsWithKeys

func GetBuildNumberFromLabelsWithKeys(m map[string]string, keys ...string) string

GetBuildNumberFromLabelsWithKeys returns the build number from the given Pod labels

func GetValueFromLabels

func GetValueFromLabels(m map[string]string, keys ...string) string

GetValueFromLabels returns the first label with the given key

func LoadDownwardAPILabels

func LoadDownwardAPILabels(text string) map[string]string

LoadDownwardAPILabels parses the /etc/podinfo/labels text into a map of label values

Types

This section is empty.

Jump to

Keyboard shortcuts

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