ci

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0, MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoMoreRuns = errors.New("no more runs")
)

Functions

func Run

func Run(scanPath string,
	runctx run.RunContext,
	opts ...earthly.EarthlyExecutorOption,
) error

Run starts the TUI application.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App represents the TUI application.

func (App) Init

func (a App) Init() tea.Cmd

func (App) Update

func (a App) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (App) View

func (a App) View() string

type CI

type CI struct {
	// contains filtered or unexported fields
}

CI represents a CI simulation.

func (*CI) Failed

func (c *CI) Failed() []*CIRun

Failed returns the failed runs of the active run group.

func (*CI) Finished

func (c *CI) Finished() bool

Finished returns true if the active run group has finished.

func (*CI) Load

func (c *CI) Load() error

Load loads the CI runs to be executed.

func (*CI) Next

func (c *CI) Next() (tea.Cmd, error)

Next returns the next command to be executed. If there are no more runs, it returns an error.

func (*CI) Run

func (c *CI) Run() tea.Cmd

Run starts the CI simulation.

func (*CI) Stop

func (c *CI) Stop()

Stop stops the CI simulation.

func (*CI) UpdateSpinners

func (c *CI) UpdateSpinners(msg tea.Msg) []tea.Cmd

UpdateSpinner updates the spinners of the CI simulation.

func (*CI) View

func (c *CI) View() string

View returns the current view of the CI simulation.

type CIRun

type CIRun struct {
	Project *project.Project
	Status  RunStatus
	Target  string
	// contains filtered or unexported fields
}

CIRun represents a CI run.

func (*CIRun) Run

func (c *CIRun) Run() tea.Msg

Run starts the CI run.

func (*CIRun) Stderr

func (c *CIRun) Stderr() string

Stderr returns the stderr of the CI run.

func (*CIRun) Stdout

func (c *CIRun) Stdout() string

Stdout returns the stdout of the CI run.

func (*CIRun) UpdateSpinner

func (c *CIRun) UpdateSpinner(msg tea.Msg) tea.Cmd

UpdateSpinner updates the spinner of the CI run.

func (*CIRun) View

func (c *CIRun) View() string

View returns the view of the CI run.

type CIRunFinishedMsg

type CIRunFinishedMsg struct {
	Run *CIRun
}

type CIRunGroup

type CIRunGroup struct {
	Runs []*CIRun
	// contains filtered or unexported fields
}

CIRunGroup represents a group of CI runs.

func (*CIRunGroup) Failed

func (c *CIRunGroup) Failed() []*CIRun

Failed returns the failed runs of the group.

func (*CIRunGroup) Finished

func (c *CIRunGroup) Finished() bool

Finished returns true if all runs in the group have finished.

func (*CIRunGroup) Run

func (c *CIRunGroup) Run() tea.Cmd

Run starts the CI run group.

func (*CIRunGroup) View

func (c *CIRunGroup) View() string

View returns the view of the CI run group.

type RunStatus

type RunStatus string

RunStatus represents the status of a CI run.

const (
	RunStatusIdle    RunStatus = "idle"
	RunStatusRunning RunStatus = "running"
	RunStatusFailed  RunStatus = "failed"
	RunStatusSuccess RunStatus = "success"
)

Jump to

Keyboard shortcuts

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