Reputation: 615
When i run Jenkins Jobs that runs DSL script as a built step to generate folder in jnkins it shows unreferenced Items which contains the job details of previously build of the same job. Is there aby way to get rid of the Unreference Item
DSL Script :
folder('project-e') {
displayName('project-e')
description('Folder for project e')
}
Console output :
Processing provided DSL script
Added items:
GeneratedJob{name='project-e'}
Unreferenced items:
GeneratedJob{name='project-b'}
Upvotes: 0
Views: 2634
Reputation: 8194
No, you can not get rid of the unreference items output. But you can ignore it if you set "Action for removed jobs" to "Ignore" in the "Process Job DSLs" build step.
Job DSL scripts are not meant to be one-time generator scripts. A script should describe a part of your Jenkins configuration. If you want to add a folder, you add a folder to the script. If you want to delete a folder, you delete the folder from the script. Then you run the Job DSL seed job to apply the changes.
Upvotes: 0