common

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BashTaskName is the name of the bash task
	BashTaskName string = "bash"
)
View Source
const (
	// ExecTaskName is the name of this file implements
	ExecTaskName string = "exec"
)
View Source
const (
	// LibraryName is the name of this task library
	LibraryName string = "common"
)

Variables

This section is empty.

Functions

func MakeBashTask added in v0.1.18

func MakeBashTask(t *v2alpha2.TaskSpec) (base.Task, error)

MakeBashTask converts an exec task spec into an exec task.

func MakeExec

func MakeExec(t *v2alpha2.TaskSpec) (base.Task, error)

MakeExec converts an exec task spec into an exec task.

func MakeTask

func MakeTask(t *v2alpha2.TaskSpec) (base.Task, error)

MakeTask constructs a Task from a TaskSpec or returns an error if any.

Types

type BashInputs added in v0.1.18

type BashInputs struct {
	Script string `json:"script" yaml:"script"`
}

BashInputs contain the name and arguments of the command to be executed.

type BashTask added in v0.1.18

type BashTask struct {
	base.TaskMeta `json:",inline" yaml:",inline"`
	With          BashInputs `json:"with" yaml:"with"`
}

BashTask encapsulates a command that can be executed.

func (*BashTask) Run added in v0.1.18

func (t *BashTask) Run(ctx context.Context) error

Run the command.

type ExecInputs

type ExecInputs struct {
	Cmd                  string        `json:"cmd" yaml:"cmd"`
	Args                 []interface{} `json:"args,omitempty" yaml:"args,omitempty"`
	DisableInterpolation bool          `json:"disableInterpolation,omitempty" yaml:"disableInterpolation,omitempty"`
}

ExecInputs contain the name and arguments of the command to be executed.

type ExecTask

type ExecTask struct {
	base.TaskMeta `json:",inline" yaml:",inline"`
	With          ExecInputs `json:"with" yaml:"with"`
}

ExecTask encapsulates a command that can be executed.

func (*ExecTask) Run

func (t *ExecTask) Run(ctx context.Context) error

Run the command.

Jump to

Keyboard shortcuts

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