Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
Jenkins=2.32.3
Jobdsl=1.63
Folders=6.0.4
CredentialsPlugin=2.1.13
-
-
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
- is related to
-
JENKINS-57435 Cannot configure SSH credentials via Job DSL
-
- Resolved
-
Activity
Field | Original Value | New Value |
---|---|---|
Resolution | Not A Defect [ 7 ] | |
Status | Open [ 1 ] | Resolved [ 5 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
Resolution | Not A Defect [ 7 ] | |
Status | Closed [ 6 ] | Reopened [ 4 ] |
Comment | [ This is a bug , folder meta data should remain as is ] |
Link |
This issue is related to |
Released As | job-dsl-plugin 1.78 | |
Assignee | Daniel Spilker [ daspilker ] | Jamie Tanna [ jamietanna ] |
Resolution | Fixed [ 1 ] | |
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
Released As | job-dsl-plugin 1.78 | job-dsl-plugin 1.78, job-dsl-plugin 1.80 |
The credentials on folder level are stored in the folder configuration. When a folder is generated by Job DSL, the whole configuration is replaced by the configuration described in Job DSL. So the credentials get lost, when running the seed job.
I do not recommend to specify credentials in DSL scripts. But you can use the Jenkins API to copy the existing credentials configuration to the Job DSL definition: