commands

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2018 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyValueArgumentObfuscator

func KeyValueArgumentObfuscator(secretArgs []string) func(args []string)

KeyValueArgumentObfuscator returns a function to scan the argument list and replace the secret argument value with the obfuscation string

func NewArchiveSource

func NewArchiveSource(url string, targetDir string) build.Source

NewArchiveSource creates a new archive source

func NewDockerBuild

func NewDockerBuild(dockerfile, contextDir string,
	buildArgs, buildSecretArgs []string, registry string, imageNames []string, pull, noCache bool) build.Target

NewDockerBuild creates a build target with specified docker file and build parameters

func NewDockerUsernamePassword

func NewDockerUsernamePassword(registry string, username string, password string) (build.DockerCredential, error)

NewDockerUsernamePassword creates a authentication object with username and password

func NewGitSource

func NewGitSource(address, branch, headRev, targetDir string, credential GitCredential) build.Source

NewGitSource create a SourceDescription that represents a git checkout

func NewLocalSource

func NewLocalSource(dir string) build.Source

NewLocalSource creates an object denoting locally mounted source

func PopulateDigests

func PopulateDigests(runner build.Runner, dependencies []build.ImageDependencies) error

PopulateDigests populates digests on dependencies

Types

type ArchiveSource

type ArchiveSource struct {
	// contains filtered or unexported fields
}

ArchiveSource defines source in the form of an archive file Currently we only support tar.gz

func (*ArchiveSource) Export

func (s *ArchiveSource) Export() []build.EnvVar

Export exports the variables

func (*ArchiveSource) Obtain

func (s *ArchiveSource) Obtain(runner build.Runner) error

Obtain downloads and extract the source

func (*ArchiveSource) Return

func (s *ArchiveSource) Return(runner build.Runner) error

Return chdir back, currently not delete the extacted source

type DirectoryTracker

type DirectoryTracker struct {
	// contains filtered or unexported fields
}

DirectoryTracker tracks switching of directories

func ChdirWithTracking

func ChdirWithTracking(runner build.Runner, chdir string) (*DirectoryTracker, error)

ChdirWithTracking performs a chdir and return the tracking object

func (*DirectoryTracker) Return

func (t *DirectoryTracker) Return(runner build.Runner) error

Return returns to the directory in affect when DirectoryTracker object is created

type GitCredential

type GitCredential interface {
	Export() []build.EnvVar
	// contains filtered or unexported methods
}

GitCredential objects are ways git authenticates

func NewGitPersonalAccessToken

func NewGitPersonalAccessToken(user string, token string) (GitCredential, error)

NewGitPersonalAccessToken creates a GitCredential object with username and token/password

func NewGitXToken

func NewGitXToken(token string) GitCredential

NewGitXToken creates a GitCredential object with a x-token

Jump to

Keyboard shortcuts

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