pipelinectx

package
v3.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// AppName the name of the app
	AppName string `env:"APP_NAME"`

	// RepoName is the name of the repository
	RepoName string `env:"REPO_NAME"`

	// RepoOwner is the user/organisation which owns the repository
	RepoOwner string `env:"REPO_OWNER"`

	// BuildNumber is build number
	BuildNumber string `env:"BUILD_NUMBER"`

	// Context is the pipeline context if there are multiple contexts.
	Context string `env:"JOB_NAME"`

	// JobType is the type of job (e.g. presubmit or postsubmit)
	JobType string `env:"JOB_TYPE"`

	// BranchName is the work directory. If not specified a temporary directory is created on startup.
	BranchName string `env:"BRANCH_NAME"`

	// Version the version being build
	Version string `env:"VERSION"`

	// PullRequestNumber the PR number if inside a Pull Request pipeline
	PullRequestNumber int `env:"PULL_NUMBER"`

	// PullSHA the git sha of the Pull Request
	PullSHA string `env:"PULL_PULL_SHA"`

	// ResourceName the unique k8s resource name we can use to create, say, Terraform instances
	ResourceName string

	// ResourceNamePrefix allows a prefix to be prepended to the resource name
	ResourceNamePrefix string

	// Labels labels for the resource
	Labels map[string]string
}

Options default options for Jenkins X Pipelines

see: https://jenkins-x.io/v3/develop/pipelines/reference/#parameters-and-environment-variables

func (*Options) AddFlags

func (o *Options) AddFlags(cmd *cobra.Command)

AddFlags adds CLI flags

func (*Options) EnvironmentDefaults

func (o *Options) EnvironmentDefaults(ctx context.Context) error

EnvironmentDefaults processes environment defaults before we parse CLI arguments

func (*Options) Validate

func (o *Options) Validate() error

Validate validates values

Jump to

Keyboard shortcuts

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