Branch: refs/heads/master
  Home:   https://github.com/jenkinsci/job-dsl-plugin
  Commit: 8d8ea63fcefe0028c5168dffd9210955c41fe773
      
https://github.com/jenkinsci/job-dsl-plugin/commit/8d8ea63fcefe0028c5168dffd9210955c41fe773
  Author: Jamie Tanna <ja...@jamietanna.co.uk>
  Date:   2020-10-04 (Sun, 04 Oct 2020)

  Changed paths:
    M job-dsl-plugin/build.gradle
    A 
job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/DslItemConfigurer.groovy
    M 
job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/JenkinsJobManagement.java
    M 
job-dsl-plugin/src/test/groovy/javaposse/jobdsl/plugin/JenkinsJobManagementSpec.groovy
    A job-dsl-plugin/src/test/resources/folder.xml

  Log Message:
  -----------
  Fix: Don't destroy credentials when re-creating folders

As noted in JENKINS-44681, any credentials on folders are lost when
re-creating folders, as we don't merge the existing credentials with the
newly created folder.

To do this, we need to find any instances of
`FolderCredentialsProvider.FolderCredentialsProperty` in the `Folder`'s
and if present, merge the credentials.

We need to promote our dependency on `cloudbees-folder` to a runtime
dependency, as we now need to reference the `Folder` and any
`FolderCredentialsProperty`s.

Note that in `JenkinsJobManagementSpec`, we need to use
`getNodeTemplate` to ensure that the real implementation of `getXml` is
called, which will execute the `configuredBlocks`.

Because we need to call to the `configure` method, we need to call out
to a new Groovy file, `DslItemConfigurer`, which processes the new
`AbstractFolderProperty` and converts it to the correct XML
representation. When parsing it, we need to make sure we add a valid XML
header, otherwise `XmlParser` will reject it.

Closes JENKINS-44681.


  Commit: 0e813584028b2a1451024524dd10df419bb782d7
      
https://github.com/jenkinsci/job-dsl-plugin/commit/0e813584028b2a1451024524dd10df419bb782d7
  Author: Jamie Tanna <git...@jamietanna.co.uk>
  Date:   2021-10-27 (Wed, 27 Oct 2021)

  Changed paths:
    M job-dsl-plugin/build.gradle
    A 
job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/DslItemConfigurer.groovy
    M 
job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/JenkinsJobManagement.java
    M 
job-dsl-plugin/src/test/groovy/javaposse/jobdsl/plugin/JenkinsJobManagementSpec.groovy
    A job-dsl-plugin/src/test/resources/folder.xml

  Log Message:
  -----------
  Merge pull request #1232 from jamietanna/defect/credentials-on-folders

Fix: Don't destroy credentials when re-creating folders


Compare: 
https://github.com/jenkinsci/job-dsl-plugin/compare/b3bd3488f6c7...0e813584028b

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-commits+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/job-dsl-plugin/push/refs/heads/master/b3bd34-0e8135%40github.com.

Reply via email to