exec

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const TejoloteURI = "http://github.com/kubernetes-sigs/tejolote"

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct{}

type Options

type Options struct {
	Verbose         bool
	CWD             string
	AttestationPath string
	Logger          *logrus.Logger
}

type Run

type Run struct {
	Executable  *command.Command
	ExitCode    int
	Artifacts   []run.Artifact
	Output      *command.Stream
	Status      command.Status
	Command     string
	Params      []string
	StartTime   time.Time
	EndTime     time.Time
	Environment RunEnvironment
}

func (*Run) InvocationData

func (r *Run) InvocationData() (slsa.ProvenanceInvocation, error)

InvocationData return the invocation of the command in SLSA strcut

func (*Run) Predicate

func (r *Run) Predicate() (*slsa.ProvenancePredicate, error)

func (*Run) WriteAttestation

func (r *Run) WriteAttestation(path string) error

WriteAttestation writes the provenance attestation describing the build

type RunEnvironment

type RunEnvironment struct {
	Variables map[string]string
	Directory string
}

type Runner

type Runner struct {
	Options Options

	Watchers []watcher.Watcher
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner() *Runner

func (*Runner) RunStep

func (r *Runner) RunStep(step *run.Step) (runner *Run, err error)

RunStep executes a step

type RunnerImplementation

type RunnerImplementation interface {
	CreateRun(*Options, *run.Step) (*Run, error)
	Snapshot(*Options, *[]watcher.Watcher) error
	Execute(*Options, *Run) error
	WriteAttestation(*Options, *Run) error
}

Jump to

Keyboard shortcuts

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