-
Bug
-
Resolution: Unresolved
-
Major
-
None
The example for the jobDsl pipeline step shows usage that cannot actually be used:
https://github.com/jenkinsci/job-dsl-plugin/wiki/User-Power-Moves#use-job-dsl-in-pipeline-scripts
node { jobDsl scriptText: 'job("example-2")' jobDsl targets: ['jobs/projectA/*.groovy', 'jobs/common.groovy'].join('\n'), removedJobAction: 'DELETE', removedViewAction: 'DELETE', lookupStrategy: 'SEED_JOB', additionalClasspath: ['libA.jar', 'libB.jar'].join('\n') }
This will always delete the job "example-2" because the second step DELETEs all unfreferenced items, unless of course one of the scripts also happens to create a job named "example-2".
From my brief look at the source, I don't think this would be easy to implement. However, it would still be incredibly useful to be able to call jobDsl multiple times with different arguments.
- is caused by
-
JENKINS-29784 DSL Job View shows many copies of Generated Items
- Closed
- is duplicated by
-
JENKINS-50875 multiple jobDSL() pipeline steps destroys all but the last
- Closed
- relates to
-
JENKINS-59158 Support running Job DSL scripts in parallel in pipeline with DISABLE or DELETE action
- Open