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

JobDSL Folder Creation Destroys Credentials

    XMLWordPrintable

Details

    • job-dsl-plugin 1.78, job-dsl-plugin 1.80

    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

            jamietanna Jamie Tanna added a comment -

            1.80 has also been released to fix this for organisation folders :+1:

            jamietanna Jamie Tanna added a comment - 1.80 has also been released to fix this for organisation folders :+1:
            jamietanna Jamie Tanna added a comment -

            Happy to say this is now closed folks!

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

            daspilker - any chance the above PR could get reviewed?

            ftclausen Friedrich Clausen added a comment - daspilker  - any chance the above PR  could get reviewed?

            The workaround suggested by daspilker 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 

            gmtm Graham McGregor added a comment - The workaround suggested by daspilker  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  
            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.

            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.

            People

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

              Dates

                Created:
                Updated:
                Resolved: