variables

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Name  string
	Value string
	Index int
}

Entry a variable entry in the file on load

type Factory

type Factory struct {
	Name     string
	Function func() (string, error)
	Value    string
}

Factory used to create a variable if its not defined locally

type Options

type Options struct {
	scmhelpers.Options
	File               string
	RepositoryName     string
	RepositoryURL      string
	ConfigMapName      string
	Namespace          string
	VersionFile        string
	BuildNumber        string
	BuildID            string
	GitCommitUsername  string
	GitCommitUserEmail string
	Commit             bool
	KubeClient         kubernetes.Interface
	JXClient           jxc.Interface
	Requirements       *jxcore.RequirementsConfig
	ConfigMapData      map[string]string
	// contains filtered or unexported fields
}

Options the options for the command

func NewCmdVariables

func NewCmdVariables() (*cobra.Command, *Options)

NewCmdVariables creates a command object for the command

func (*Options) FindBuildNumber

func (o *Options) FindBuildNumber(buildID string) (string, error)

FindBuildNumber finds the build number for the given build ID

func (*Options) FindDockerfilePath

func (o *Options) FindDockerfilePath() (string, error)

FindDockerfilePath finds the dockerfile path to use relative to the current directory

func (*Options) GetBuildID

func (o *Options) GetBuildID() string

GetBuildID returns the current build ID

func (*Options) GetBuildNumber

func (o *Options) GetBuildNumber() (string, error)

GetBuildNumber returns the build number from BUILD_NUMBER or uses PipelineActivities to create/find it

func (*Options) Run

func (o *Options) Run() error

Run implements the command

func (*Options) Validate

func (o *Options) Validate() error

Run implements the command

Jump to

Keyboard shortcuts

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