stubs

package
v0.0.0-...-958d37d Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	RepoFullName         = "shipwright-io/sample-nodejs"
	HeadCommitID         = "commit-id"
	HeadCommitMsg        = "commit message"
	HeadCommitAuthorName = "Author's Name"
	BeforeCommitID       = "before-commit-id"
	GitRef               = "refs/heads/main"
)
View Source
const (
	Namespace             = "default"
	Branch                = "main"
	PipelineNameInTrigger = "pipeline"
)

Variables

View Source
var (
	// TriggerWhenPushToMain describes a trigger for a github push event on default branch.
	TriggerWhenPushToMain = buildapi.TriggerWhen{
		Type: buildapi.GitHubWebHookTrigger,
		GitHub: &buildapi.WhenGitHub{
			Events: []buildapi.GitHubEventName{
				buildapi.GitHubPushEvent,
			},
			Branches: []string{Branch},
		},
	}
	// TriggerWhenPipelineSucceeded describes a trigger for Tekton Pipeline on status "succeeded".
	TriggerWhenPipelineSucceeded = buildapi.TriggerWhen{
		Type: buildapi.PipelineTrigger,
		ObjectRef: &buildapi.WhenObjectRef{
			Name:     PipelineNameInTrigger,
			Status:   []string{"Succeeded"},
			Selector: map[string]string{},
		},
	}
)
View Source
var RepoURL = "https://github.com/shipwright-io/sample-nodejs"
View Source
var TektonPipelineRunStatusCustomTaskShipwright = &tektonapi.PipelineSpec{
	Tasks: []tektonapi.PipelineTask{TektonPipelineTaskRefToShipwright},
}
View Source
var TektonPipelineTaskRefToShipwright = tektonapi.PipelineTask{
	Name: "shipwright",
	TaskRef: &tektonapi.TaskRef{
		APIVersion: constants.ShipwrightAPIVersion,
		Name:       "name",
	},
}
View Source
var TektonTaskRefToTekton = &tektonapibeta.TaskRef{
	Name: "task-ex",
}

Functions

func GitHubPingEvent

func GitHubPingEvent() github.PingEvent

func GitHubPushEvent

func GitHubPushEvent() github.PushEvent

func ShipwrightBuild

func ShipwrightBuild(outputImageBase, name string) *buildapi.Build

ShipwrightBuild returns a Build using informed output image base and name.

func ShipwrightBuildRun

func ShipwrightBuildRun(name string) *buildapi.BuildRun

ShipwrightBuildRun returns a empty BuildRun instance using informed name.

func ShipwrightBuildWithTriggers

func ShipwrightBuildWithTriggers(
	outputImageBase,
	name string,
	triggers ...buildapi.TriggerWhen,
) *buildapi.Build

ShipwrightBuildWithTriggers creates a Build with optional triggers.

func TektonCustomRun

func TektonCustomRun(name string, ref *tektonapibeta.TaskRef) *tektonapibeta.CustomRun

func TektonCustomRunStarted

func TektonCustomRunStarted(name string, ref *tektonapibeta.TaskRef) *tektonapibeta.CustomRun

TektonCustomRunStarted returns a started (now) CustomRun instance using the name and TaskRef informed.

func TektonPipelineRun

func TektonPipelineRun(name string) tektonapi.PipelineRun

func TektonPipelineRunCanceled

func TektonPipelineRunCanceled(name string) tektonapi.PipelineRun

func TektonPipelineRunFailed

func TektonPipelineRunFailed(name string) tektonapi.PipelineRun

func TektonPipelineRunRunning

func TektonPipelineRunRunning(name string) tektonapi.PipelineRun

func TektonPipelineRunSucceeded

func TektonPipelineRunSucceeded(name string) tektonapi.PipelineRun

func TektonPipelineRunTimedOut

func TektonPipelineRunTimedOut(name string) tektonapi.PipelineRun

func TektonTaskRefToShipwright

func TektonTaskRefToShipwright(name string) *tektonapibeta.TaskRef

Types

This section is empty.

Jump to

Keyboard shortcuts

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