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

JobDSL Folder Creation Destroys Credentials

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      job-dsl-plugin 1.78

      Description

      When using job-dsl-plugin to create a folder 

      folder(my_folder) { 

        displayname("my_folder_name")

      }

      If the folder exists with Credentials attached to it, they are lost on recreation  . Is there anyway to wrap this in a conditional? if!(folder(my_folder) {blah..blah....}.  I believe the desired behaviour here is to not blow away the credentials attached at the folder level.

       

       

        Attachments

          Issue Links

            Activity

            Hide
            jamietanna Jamie Tanna added a comment -

            I've been looking into this today, and have found a way to handle this within the plugin itself (via the IntelliJ debugger). I am going to be working on integrating this into the plugin itself, then will raise a PR on GitHub.

            Show
            jamietanna Jamie Tanna added a comment - I've been looking into this today, and have found a way to handle this within the plugin itself (via the IntelliJ debugger). I am going to be working on integrating this into the plugin itself, then will raise a PR on GitHub.
            Hide
            jamietanna Jamie Tanna added a comment - - edited

            I've raised https://github.com/jenkinsci/job-dsl-plugin/pull/1232 as a suggested fix for this.

            Show
            jamietanna Jamie Tanna added a comment - - edited I've raised https://github.com/jenkinsci/job-dsl-plugin/pull/1232 as a suggested fix for this.
            Hide
            gmtm Graham McGregor added a comment -

            The workaround suggested by Daniel Spilker above no longer works in sandbox mode with the latest version of the script-security plugin due to https://issues.jenkins.io/browse/JENKINS-63788 

            Show
            gmtm Graham McGregor added a comment - The workaround suggested by Daniel Spilker  above no longer works in sandbox mode with the latest version of the script-security plugin due to https://issues.jenkins.io/browse/JENKINS-63788  
            Hide
            ftclausen Friedrich Clausen added a comment -

            Daniel Spilker - any chance the above PR could get reviewed?

            Show
            ftclausen Friedrich Clausen added a comment - Daniel Spilker  - any chance the above PR  could get reviewed?
            Hide
            jamietanna Jamie Tanna added a comment -

            Happy to say this is now closed folks!

            Show
            jamietanna Jamie Tanna added a comment - Happy to say this is now closed folks!

              People

              Assignee:
              jamietanna Jamie Tanna
              Reporter:
              smithx10 Bruce Smith
              Votes:
              12 Vote for this issue
              Watchers:
              24 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: