Documentation ¶
Overview ¶
Package jobs implements common jenkins jobs operations
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrorUnexpectedBuildStatus - this is custom error returned when jenkins build has unexpected status ErrorUnexpectedBuildStatus = fmt.Errorf("unexpected build status") // ErrorBuildFailed - this is custom error returned when jenkins build has failed ErrorBuildFailed = fmt.Errorf("build failed") // ErrorAbortBuildFailed - this is custom error returned when jenkins build couldn't be aborted ErrorAbortBuildFailed = fmt.Errorf("build abort failed") // ErrorUnrecoverableBuildFailed - this is custom error returned when jenkins build has failed and cannot be recovered ErrorUnrecoverableBuildFailed = fmt.Errorf("build failed and cannot be recovered") // ErrorNotFound - this is error returned when jenkins build couldn't be found ErrorNotFound = fmt.Errorf("404") // BuildRetires - determines max amount of retires for failed build BuildRetires = 3 )
Functions ¶
This section is empty.
Types ¶
type Jobs ¶
type Jobs struct {
// contains filtered or unexported fields
}
Jobs defines Jobs API tailored for operator sdk
func (*Jobs) EnsureBuildJob ¶
func (jobs *Jobs) EnsureBuildJob(jobName, hash string, parameters map[string]string, jenkins *v1alpha1.Jenkins, preserveStatus bool) (done bool, err error)
EnsureBuildJob function takes care of jenkins build lifecycle according to the lifecycle of reconciliation loop implementation guarantees that jenkins build can be properly handled even after operator pod restart entire state is saved in Jenkins.Status.Builds section function return 'true' when build finished successfully or false when reconciliation loop should requeue this function preserveStatus determines that build won't be removed from Jenkins.Status.Builds section
Click to show internal directories.
Click to hide internal directories.