cmd

package
v0.0.0-...-475285e Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildCmd

type BuildCmd struct {
	BaseRef string `short:"b" help:"Base image reference" env:"TKO_BASE_REF" default:"ubuntu:jammy"`

	Platform string `short:"p" help:"Platform to build for" env:"TKO_PLATFORM" default:"linux/amd64"`

	SourcePath       string `arg:"" help:"Path to artifacts to embed" type:"path" env:"TKO_SOURCE_PATH"`
	DestinationPath  string `short:"d" help:"Path to embed artifacts in" env:"TKO_DEST_PATH" default:"/tko-app"`
	DestinationChown bool   `help:"Whether to chown the destination path to root:root" default:"true"`
	Entrypoint       string `help:"Entrypoint for the embedded artifacts" env:"TKO_ENTRYPOINT" default:"/tko-app/app"`

	TargetRepo string `short:"t" help:"Target repository" env:"TKO_TARGET_REPO" required:"true"`
	TargetType string `short:"T" help:"Target type" env:"TKO_TARGET_TYPE" default:"REMOTE" enum:"REMOTE,LOCAL_DAEMON,LOCAL_FILE"`

	Author                string            `help:"Author of the build" env:"TKO_AUTHOR" default:"github.com/dskiff/tko"`
	DefaultAnnotations    map[string]string `short:"A" help:"Default annotations to apply to the image" env:"TKO_DEFAULT_ANNOTATIONS" default:"" mapsep:"," sep:"="`
	Annotations           map[string]string `` /* 148-byte string literal not displayed */
	AutoVersionAnnotation string            `help:"Automatically apply version annotations" env:"TKO_AUTO_VERSION_ANNOTATION" default:"none" enum:"git,none"`
	Env                   map[string]string `short:"e" help:"Environment variables to set in the build" env:"TKO_ENV_VARS" default:"" mapsep:"," sep:"="`

	RegistryUser string `` /* 133-byte string literal not displayed */
	RegistryPass string `` /* 137-byte string literal not displayed */

	Tmp     string `help:"Path where tko can write temporary files. Defaults to golang's tmp logic." env:"TKO_TMP" default:""`
	Verbose bool   `short:"v" help:"Enable verbose output"`
}

func (*BuildCmd) Run

func (b *BuildCmd) Run(cliCtx *CliCtx) error

type CLI

type CLI struct {
	Version VersionCmd `cmd:"" help:"Show version."`

	Build BuildCmd `cmd:"" help:"Build and publish a container image."`
}

type CliCtx

type CliCtx struct {
	Context          context.Context
	TkoBuildVersion  string
	TkoBuildCommit   string
	TkoBuildDate     string
	ExitCleanWatcher *build.ExitCleanupWatcher
}

type GitInfo

type GitInfo struct {
	Dirty      bool
	CommitHash string
	Tag        []string
}

type SimpleKeychain

type SimpleKeychain struct {
	Username string
	Password string
	Registry string
}

func (*SimpleKeychain) Get

func (s *SimpleKeychain) Get(serverURL string) (string, string, error)

type VersionCmd

type VersionCmd struct{}

func (*VersionCmd) Run

func (v *VersionCmd) Run(cliCtx *CliCtx) error

Jump to

Keyboard shortcuts

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