v2

package
v2.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Cache = "Cache"
	Build = "Build"
)
View Source
const (
	NotStarted = "NotStarted"
	InProgress = "InProgress"
	Complete   = "Complete"
	Failed     = "Failed"
	Info       = "Information"
	Started    = "Started"
	Succeeded  = "Succeeded"
	Terminated = "Terminated"
	Canceled   = "Canceled"
)

Variables

This section is empty.

Functions

func ApplicationLog

func ApplicationLog(podName, containerName, prefix, message, formattedMessage string)

func AutoTriggerDiff

func AutoTriggerDiff(phase constants.Phase, val bool) (bool, error)

func BuildCanceled

func BuildCanceled(artifact, platforms string, err error)

func BuildFailed

func BuildFailed(artifact, platforms string, err error)

func BuildInProgress

func BuildInProgress(artifact, platforms string)

func BuildSucceeded

func BuildSucceeded(artifact, platforms string)

func CacheCheckHit

func CacheCheckHit(artifact, platforms string)

func CacheCheckInProgress

func CacheCheckInProgress(artifact, platforms string)

func CacheCheckMiss

func CacheCheckMiss(artifact, platforms string)

func CloudRunServiceReady

func CloudRunServiceReady(r, url, revision string)

func CustomActionTaskFailed added in v2.4.0

func CustomActionTaskFailed(name string, err error)

CustomActionTaskFailed adds an event to mark a custom action task has been failed.

func CustomActionTaskInProgress added in v2.4.0

func CustomActionTaskInProgress(name string)

CustomActionTaskInProgress adds an event to mark a custom action task start.

func CustomActionTaskSucceeded added in v2.4.0

func CustomActionTaskSucceeded(name string)

CustomActionTaskSucceeded adds an event to mark a custom action task has been succeeded.

func DebuggingContainerStarted

func DebuggingContainerStarted(podName, containerName, namespace, artifact, runtime, workingDir string, debugPorts map[string]uint32)

DebuggingContainerStarted notifies that a debuggable container has appeared.

func DebuggingContainerTerminated

func DebuggingContainerTerminated(podName, containerName, namespace, artifact, runtime, workingDir string, debugPorts map[string]uint32)

DebuggingContainerTerminated notifies that a debuggable container has disappeared.

func DeployFailed

func DeployFailed(id int, err error)

func DeployInProgress

func DeployInProgress(id int)

func DeploySucceeded

func DeploySucceeded(id int)

func ForEachApplicationLog

func ForEachApplicationLog(callback func(*proto.Event) error) error

func ForEachEvent

func ForEachEvent(callback func(*proto.Event) error) error

func GetIteration

func GetIteration() int

func GetState

func GetState() (*proto.State, error)

func Handle

func Handle(event *proto.Event) error

func InitializeState

func InitializeState(cfg Config)

InitializeState instantiates the global state of the skaffold runner, as well as the event log.

func LogMetaEvent

func LogMetaEvent()

func NewLogHook

func NewLogHook() logrus.Hook

func NewLogger

func NewLogger(phase constants.Phase, subtaskID string) io.Writer

func PortForwarded

func PortForwarded(localPort int32, remotePort util.IntOrString, podName, containerName, namespace string, portName string, resourceType, resourceName, address string)

PortForwarded notifies that a remote port has been forwarded locally.

func RendererFailed

func RendererFailed(id int, err error)

RendererFailed adds an event to mark a render process has been failed.

func RendererInProgress

func RendererInProgress(id int)

RendererInProgress adds an event to mark a render process starts.

func RendererSucceeded

func RendererSucceeded(id int)

RendererSucceeded adds an event to mark a render process has been succeeded.

func ResetStateOnBuild

func ResetStateOnBuild()

ResetStateOnBuild resets the build, test, deploy and sync state

func ResetStateOnDeploy

func ResetStateOnDeploy()

ResetStateOnDeploy resets the deploy, sync and status check state

func ResetStateOnTest

func ResetStateOnTest()

ResetStateOnTest resets the test, deploy, sync and status check state

func ResourceStatusCheckEventCompleted

func ResourceStatusCheckEventCompleted(r string, ae *proto.ActionableErr)

func ResourceStatusCheckEventCompletedMessage

func ResourceStatusCheckEventCompletedMessage(r string, message string, ae *proto.ActionableErr)

func ResourceStatusCheckEventUpdated

func ResourceStatusCheckEventUpdated(r string, ae *proto.ActionableErr)

func ResourceStatusCheckEventUpdatedMessage

func ResourceStatusCheckEventUpdatedMessage(r string, message string, ae *proto.ActionableErr)

func SaveEventsToFile

func SaveEventsToFile(fp string) error

SaveEventsToFile saves the current event log to the filepath provided

func SaveLastLog

func SaveLastLog(fp string) error

SaveLastLog writes the output from the previous run to the specified filepath

func SendErrorMessageOnce

func SendErrorMessageOnce(task constants.Phase, subtaskID string, err error)

SendErrorMessageOnce sends an error message to skaffold log events stream only once. Use it if you want to avoid sending duplicate error messages.

func TaskFailed

func TaskFailed(task constants.Phase, err error)

func TaskInProgress

func TaskInProgress(task constants.Phase, description string)

func TaskSucceeded

func TaskSucceeded(task constants.Phase)

func TesterFailed

func TesterFailed(id int, err error)

func TesterInProgress

func TesterInProgress(id int)

func TesterSucceeded

func TesterSucceeded(id int)

func UpdateStateAutoBuildTrigger

func UpdateStateAutoBuildTrigger(t bool)

func UpdateStateAutoDeployTrigger

func UpdateStateAutoDeployTrigger(t bool)

func UpdateStateAutoSyncTrigger

func UpdateStateAutoSyncTrigger(t bool)

func VerifyFailed

func VerifyFailed(name string, err error)

VerifyFailed adds an event to mark a render process has been failed.

func VerifyInProgress

func VerifyInProgress(name string)

VerifyInProgress adds an event to mark a render process starts.

func VerifySucceeded

func VerifySucceeded(name string)

VerifySucceeded adds an event to mark a render process has been succeeded.

func WaitForConnection

func WaitForConnection()

WaitForConnection will block execution until the server receives a connection

Types

type Config

type Config interface {
	GetKubeContext() string
	AutoBuild() bool
	AutoDeploy() bool
	AutoSync() bool
	GetPipelines() []latest.Pipeline
	GetRunID() string
}

Jump to

Keyboard shortcuts

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