Documentation ¶
Index ¶
- Constants
- func CreateOrUpdatePipeline(knativePipelineClient kpipelineclient.Interface, ns string, ...) (*v1alpha1.Pipeline, error)
- func CreateOrUpdateSourceResource(knativePipelineClient kpipelineclient.Interface, ns string, ...) (*v1alpha1.PipelineResource, error)
- func CreateOrUpdateTask(knativePipelineClient kpipelineclient.Interface, ns string, ...) (*v1alpha1.Task, error)
- func CreatePipelineRun(knativePipelineClient kpipelineclient.Interface, ns string, ...) (*v1alpha1.PipelineRun, error)
- func GetLastBuildNumber(pipeline *v1alpha1.Pipeline) int
- func PipelineResourceName(gitInfo *gits.GitRepository, branch string, context string) string
- func UpdateLastPipelineBuildNumber(knativePipelineClient kpipelineclient.Interface, ns string, ...) error
Constants ¶
const ( // LastBuildNumberAnnotation used to annotate the Pipeline with the latest build number LastBuildNumberAnnotation = "jenkins.io/last-build-number" // PipelineAPIVersion the APIVersion for using knative pipeline PipelineAPIVersion = "pipeline.knative.dev/v1alpha1" )
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdatePipeline ¶
func CreateOrUpdatePipeline(knativePipelineClient kpipelineclient.Interface, ns string, gitInfo *gits.GitRepository, branch string, context string, resources []v1alpha1.PipelineDeclaredResource, tasks []v1alpha1.PipelineTask, labels map[string]string) (*v1alpha1.Pipeline, error)
CreateOrUpdatePipeline lazily creates a Knative Pipeline for the given git repository, branch and context
func CreateOrUpdateSourceResource ¶
func CreateOrUpdateSourceResource(knativePipelineClient kpipelineclient.Interface, ns string, gitInfo *gits.GitRepository, branch string) (*v1alpha1.PipelineResource, error)
CreateOrUpdateSourceResource lazily creates a Knative Pipeline PipelineResource for the given git repository
func CreateOrUpdateTask ¶
func CreateOrUpdateTask(knativePipelineClient kpipelineclient.Interface, ns string, created *v1alpha1.Task) (*v1alpha1.Task, error)
CreateOrUpdateTask lazily creates a Knative Pipeline Task
func CreatePipelineRun ¶
func CreatePipelineRun(knativePipelineClient kpipelineclient.Interface, ns string, pipeline *v1alpha1.Pipeline, run *v1alpha1.PipelineRun, duration time.Duration) (*v1alpha1.PipelineRun, error)
CreatePipelineRun lazily creates a Knative Pipeline Task
func GetLastBuildNumber ¶
GetLastBuildNumber returns the last build number on the Pipeline
func PipelineResourceName ¶
func PipelineResourceName(gitInfo *gits.GitRepository, branch string, context string) string
PipelineResourceName returns the pipeline resource name for the given git repository, branch and context
func UpdateLastPipelineBuildNumber ¶
func UpdateLastPipelineBuildNumber(knativePipelineClient kpipelineclient.Interface, ns string, pipeline *v1alpha1.Pipeline, buildNumber int, duration time.Duration) error
UpdateLastPipelineBuildNumber keeps trying to update the last build number annotation on the Pipeline until it succeeds or another thread/process beats us to it
Types ¶
This section is empty.