Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-51035

Regression: Job DSL `folder('existing-folder')` creation destroys any views in that folder

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • job-dsl-plugin
    • None

      This is a regression observed between Jenkins LTS 2.89.4 and LTS 2.107.2.

      The version of the Job DSL plugin (1.69) is unchanged.

      To reproduce:

      1. Run the following Job DSL to create a folder and some sample views within that folder.

      folder('/dir') {
        displayName('dir')
      }
      buildMonitorView('/dir/Test BMV') {
        jobs { regex('.*') }
      }
      listView('/dir/Test LV') {
        jobs { regex(".*") }
      }

      2. Run the following Job DSL script on its own.

      folder('/dir') {
        displayName('dir')
      }

       

      Before the upgrade to Jenkins 2.107.2, this worked fine.  Following the upgrade, step 2 destroys the views that were created in step 1.

            daspilker Daniel Spilker
            oliverlockwood Oliver Lockwood
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: