JobDSL - Create a new job if it doesn't exist in Jenkins already
问题 I created this Groovy JobDSLs script to generate a new Jenkins jobs. List screen = [["AAA", "Description" ],["AAA", "Description" ]] for (item in screen) { job(item[0]) { description(item[1]) steps { shell('command ...') } } } Is there a way how to tell JobDSL plugin to not create a job in the List, if it already exists in Jenkins? I don't want to keep to separate files for generating new jobs. One file for new jobs and one file for all existing jobs. 回答1: If a job definition does not