exec

package
v0.0.0-...-ccb11bd Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package exec GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Run

type Run struct {
	task.Task

	// current workdir
	Cwd wd.WorkDir `json:"cwd"`
	// cmd for executing
	Command client.StringOrSlice `json:"cmd"`
	// env vars
	Env map[string]client.SecretOrString `json:"env,omitempty"`
	// executing user
	User string `json:"user,omitempty"`

	// other setting
	With RunOption `json:"with,omitempty"`

	// exists when `with.stdout` enabled
	Stdout *string `json:"-" output:"stdout,omitempty"`
	// exists when `with.stdout` enabled
	Stderr *string `json:"-" output:"stderr,omitempty"`
}

Run some cmd

func (*Run) Do

func (r *Run) Do(ctx context.Context) error

func (Run) RuntimeDoc

func (v Run) RuntimeDoc(names ...string) ([]string, bool)

type RunOption

type RunOption struct {
	// when enabled
	// once executed failed, will break whole pipeline
	// otherwise, just set result
	Failfast bool `json:"failfast,omitempty" default:"true"`

	// when enabled
	// `result.stdout` should be with the string value
	// otherwise, just log stdout
	Stdout bool `json:"stdout,omitempty" default:"false"`

	// when enabled
	// `result.ok` will not set be false if empty stdout
	StdoutOmitempty bool `json:"stdoutOmitempty,omitempty" default:"false"`

	// when enabled
	// `result.stderr` should be with the string value
	// otherwise, just log stderr
	Stderr bool `json:"stderr,omitempty" default:"false"`
}

func (RunOption) RuntimeDoc

func (v RunOption) RuntimeDoc(names ...string) ([]string, bool)

Jump to

Keyboard shortcuts

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