build

package
v0.1.0-alpha.59 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUserCancelled = errors.New("user cancelled")

Functions

func PullOutput

func PullOutput(output, url, ref, branch, targetDir string, targetGroup console.Group) error

PullOutput handles downloading or cloning a build target output

func View

func View(build stainless.Build, downloads map[stainless.Target]DownloadStatus) string

func ViewBuildPipeline

func ViewBuildPipeline(build stainless.Build, target stainless.Target, downloads map[stainless.Target]DownloadStatus) string

View renders the build pipeline for a target

func ViewStepSymbol

func ViewStepSymbol(status, conclusion string) string

ViewStepSymbol returns a colored symbol for a build step status

Types

type DownloadMsg

type DownloadMsg struct {
	Target stainless.Target
	// One of "not_started", "in_progress", "completed"
	Status string
	// One of "success", "failure',
	Conclusion string
	Error      string
}

type DownloadStatus

type DownloadStatus struct {
	Status string // one of "not_started" "in_progress" "completed"
	// One of "success", "failure', or empty if Status not "completed"
	Conclusion string
	Path       string
	Error      string // Error message if Conclusion is "failure"
}

type ErrorMsg

type ErrorMsg error

type FetchBuildMsg

type FetchBuildMsg stainless.Build

type Model

type Model struct {
	stainless.Build // Current build. This component will keep fetching it until the build is completed. A zero value is permitted.

	Client    stainless.Client
	Ctx       context.Context
	Branch    string                              // Optional branch name for git checkout
	Downloads map[stainless.Target]DownloadStatus // When a BuildTarget has a commit available, this target will download it, if it has been specified in the initialization.
	Err       error                               // This will be populated if the model concludes with an error
}

func NewModel

func NewModel(client stainless.Client, ctx context.Context, build stainless.Build, branch string, downloadPaths map[stainless.Target]string) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type TickMsg

type TickMsg time.Time

Jump to

Keyboard shortcuts

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