Plugin Used: "delivery-pipeline-plugin@1.4.2"
Confirmed in Jenkins Job DSL Playground (http://job-dsl.herokuapp.com/) that the job tag is ignored when converting groovy to XML as akom mentions. This makes it impossible to add Pipelines to the "Delivery Pipeline View for Jenkins Pipelines" without using the UI.
This componentSpecs in groovy
componentSpecs \{
'se.diabol.jenkins.workflow.WorkflowPipelineView_-ComponentSpec' {
name 'test'
job "test"
}
Translates to this componentSpecs in XML
<componentSpecs>
<se.diabol.jenkins.workflow.WorkflowPipelineView_-ComponentSpec>
<name>test</name>
</se.diabol.jenkins.workflow.WorkflowPipelineView_-ComponentSpec>
</componentSpecs>
Whereas if I change the job tag to “jobs” it is not ignored.
This componentSpecs in groovy
componentSpecs \{
'se.diabol.jenkins.workflow.WorkflowPipelineView_-ComponentSpec' {
name 'test'
jobs 'test'
}
Translates to this componentSpecs in XML
<componentSpecs>
<se.diabol.jenkins.workflow.WorkflowPipelineView_-ComponentSpec>
<name>test</name>
<jobs>test</jobs>
</se.diabol.jenkins.workflow.WorkflowPipelineView_-ComponentSpec>
</componentSpecs>
When creating the view with JOB DSL the only fields available to populate are name and description as akom mentions above.
workflowPipelineView {
name(String value)
description(String value)
}
When you try to add another field such as noOfColumns()
folder('TEST') {
views {
workflowPipelineView {
name('test')
description('test')
noOfColumns(1)
}
}
}
It returns this error.
ERROR: (script, line 11) No signature of method: noOfColumns() is applicable for argument types: (java.lang.Integer) values: [1]
Possible solutions: name(), description()
patbos would it be possible to allow all fields to be configured when creating the view through JOB DSL like daspilker mentions here?
https://issues.jenkins.io/browse/JENKINS-59117?focusedCommentId=409185&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-409185
Failing that could a fix be put in for the bug that ignores the job tag when converting groovy to XML as detailed above?
Thank you.
https://github.com/Diabol/delivery-pipeline-plugin/pull/304
https://github.com/jenkinsci/job-dsl-plugin/pull/1200
These two pull requests will enable Dynamic DSL support: