-
Bug
-
Resolution: Fixed
-
Major
-
None
When using a configure block within a with block, it seems that the configure block may be executed multiple times. For example, I have a job that looks basically like this:
def job = workflowJob(job_prefix) { parameters { ... } definition { cpsScm { scm { git { remote { url(git_repo) } branch(git_branch) } } scriptPath(relative_jenkinsfile) } } logRotator { numToKeep(50) } } job.with { out.println("IN JOB.WITH BLOCK") triggers { scm('H H(21-22) * * 1') } configure { Node project -> out.println("EXECUTING JOB CONFIGURE") } }
When I run the seed job, I see the IN JOB.WITH BLOCK message only once, but the EXECUTING JOB CONFIGURE message is printed three times.