mirror of
https://github.com/jenkinsci/kubernetes-operator.git
synced 2026-10-21 04:23:25 +02:00
Change signature of CreateOrUpdateJob function
This commit is contained in:
@@ -40,10 +40,13 @@ func New(jenkinsClient jenkinsclient.Jenkins, k8sClient k8s.Client, logger logr.
|
||||
|
||||
// ConfigureGroovyJob configures jenkins job for executing groovy scripts
|
||||
func (g *Groovy) ConfigureGroovyJob() error {
|
||||
_, err := g.jenkinsClient.CreateOrUpdateJob(fmt.Sprintf(configurationJobXMLFmt, g.scriptsPath), g.jobName)
|
||||
_, created, err := g.jenkinsClient.CreateOrUpdateJob(fmt.Sprintf(configurationJobXMLFmt, g.scriptsPath), g.jobName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if created {
|
||||
g.logger.Info(fmt.Sprintf("'%s' job has been created", g.jobName))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user