-
Bug
-
Resolution: Fixed
-
Minor
-
Jenkins: 2.190.1
job-dsl-plugin: 1.77
-
-
job-dsl-plugin 1.78
When generating jobs using the job-dsl-plugin, jobs that are created under folders that already exist with a folder name that doesn't match the casing seem to be referenced to the correct folder under the hood. However, when you remove the last job, or folder definition, that matches this casing while other jobs still exist under the original casing it gets added to the unreferenced list and, in our case, deleted.
Example:
A single job gets created:
# job definition folder('test-folder') job('test-folder/someJob') # seed-job output Added items: GeneratedJob{name='test-folder'} GeneratedJob{name='test-folder/someJob'}
A second job gets created, with the same folder name cased differently:
# job definition folder('TEST-FOLDER') job('TEST-FOLDER/newJob') # seed-job output Added items: GeneratedJob{name='TEST-FOLDER'} GeneratedJob{name='TEST-FOLDER/newJob'}
Second job gets removed by deleting the job definition
# seed-job output Unreferenced items: GeneratedJob{name='TEST-FOLDER'} GeneratedJob{name='TEST-FOLDER/newJob'} Removed items: GeneratedJob{name='TEST-FOLDER'}
When this folder gets deleted, it deletes the job and history for the first job created as well.