cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Root = &cobra.Command{
	Use:   "tkn tstart [flags] FILE|URL",
	Short: "Start a Tekton TaskRun or PipelineRun with TUI parameter review",
	Long: `tkn tstart starts a Tekton TaskRun or PipelineRun from a YAML manifest.

The manifest may be a local file path or a URL:

  Local file           ./run.yaml  or  /path/to/run.yaml
  Generic HTTPS        https://example.com/run.yaml
  GitHub blob          https://github.com/user/repo/blob/main/run.yaml
  GitHub raw           https://raw.githubusercontent.com/user/repo/main/run.yaml
  GitHub Gist          https://gist.github.com/user/<id>          (first YAML file)
                       https://gist.github.com/user/<id>/raw/<rev>/<file>
  GitHub Enterprise    https://<host>/user/repo/blob/branch/run.yaml

GitHub and GHE credentials are resolved in order:
  1. Token stored by the gh CLI (gh auth login / GH_TOKEN / GITHUB_TOKEN)
  2. No authentication (public content)

Parameter values are resolved via bash-style environment variable substitution
before being presented in an interactive TUI for review and editing. Any
parameter whose value is a substitution expression that resolves to empty is
highlighted as required. Parameters explicitly set to "" in the manifest are
treated as intentionally empty and are not required.

Environment variable substitution reference:

  ${VAR}           Value of VAR; empty string if unset
  $VAR             Same as ${VAR}, no braces
  ${VAR:-default}  Value of VAR if set and non-empty, else "default"
  ${VAR-default}   Value of VAR if set (even if empty), else "default"
  ${VAR:=default}  Like :- but also assigns VAR=default in the environment
  ${VAR=default}   Like - but also assigns VAR=default in the environment
  ${VAR:+alt}      "alt" if VAR is set and non-empty, else empty string
  ${VAR+alt}       "alt" if VAR is set (even if empty), else empty string
  ${VAR:?message}  Error (exit 1) if VAR is unset or empty
  ${VAR?message}   Error (exit 1) if VAR is unset
  ${#VAR}          Length of VAR's value as a decimal string
  ${VAR#pattern}   Remove shortest prefix matching glob pattern from VAR
  ${VAR##pattern}  Remove longest prefix matching glob pattern from VAR
  ${VAR%pattern}   Remove shortest suffix matching glob pattern from VAR
  ${VAR%%pattern}  Remove longest suffix matching glob pattern from VAR

With --yes, substitution errors from :? and ? are fatal. In TUI mode they are
shown as empty values that the user can fill in.`,
	Args:         cobra.ExactArgs(1),
	SilenceUsage: true,
	RunE: func(cmd *cobra.Command, args []string) error {
		return execute(args[0])
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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