Documentation ¶
Index ¶
- Constants
- Variables
- func GitHubPingEvent() github.PingEvent
- func GitHubPushEvent() github.PushEvent
- func ShipwrightBuild(outputImageBase, name string) *buildapi.Build
- func ShipwrightBuildRun(name string) *buildapi.BuildRun
- func ShipwrightBuildWithTriggers(outputImageBase, name string, triggers ...buildapi.TriggerWhen) *buildapi.Build
- func TektonCustomRun(name string, ref *tektonapibeta.TaskRef) *tektonapibeta.CustomRun
- func TektonCustomRunStarted(name string, ref *tektonapibeta.TaskRef) *tektonapibeta.CustomRun
- func TektonPipelineRun(name string) tektonapi.PipelineRun
- func TektonPipelineRunCanceled(name string) tektonapi.PipelineRun
- func TektonPipelineRunFailed(name string) tektonapi.PipelineRun
- func TektonPipelineRunRunning(name string) tektonapi.PipelineRun
- func TektonPipelineRunSucceeded(name string) tektonapi.PipelineRun
- func TektonPipelineRunTimedOut(name string) tektonapi.PipelineRun
- func TektonTaskRefToShipwright(name string) *tektonapibeta.TaskRef
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 GitHubPushEvent ¶
func ShipwrightBuild ¶
ShipwrightBuild returns a Build using informed output image base and name.
func ShipwrightBuildRun ¶
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.
Click to show internal directories.
Click to hide internal directories.