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

Creating folder removes existing views within that

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • job-dsl-plugin
    • None
    • jenkins 1.625.1
      job-dsl-plugin 1.39
      cloudbees-folder 5.0

      I have a 2 level scheme for using Job DSL. The top level seed job creates folders and seed jobs within them. The per-folder seed job creates jobs and views within that folder.

      If I run the top level seed after the per-folder seed then jobs remain but the views are removed.

      This can be seen by running the following in a "Process Job DSLs" step (with action for removed jobs and views set to "Ignore"). Run this top level seed, then the afolder/seed and the job and view are created. Run the top level seed again and afolder/aview has disappeared.

      folder('afolder')
      job('afolder/seed') {
        description('Create a view and a job')
        steps {
          dsl {
            text("""listView('aview') {}
      job('ajob') {}""")
            lookupStrategy('SEED_JOB')
          }
        }
      }
      

            jamietanna Jamie Tanna
            rg Russell Gallop
            Votes:
            5 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated: