-
Bug
-
Resolution: Fixed
-
Minor
-
Jenkins 1.619
job-dsl-plugin 1.39
workflow-plugin 1.10
javaposse.jobdsl.dsl.jobs.WorkflowJob (which matches org.jenkinsci.plugins.workflow.job.WorkflowJob) extends javaposse.jobdsl.dsl.Job (which mainly matches hudson.model.AbstractProject) whereas hudson.model.AbstractProject is not a parent class of org.jenkinsci.plugins.workflow.job.WorkflowJob.
That results in invalid configuration file being generated when using the javaposse.jobdsl.dsl.Job API combined with javaposse.jobdsl.dsl.DslFactory#workflowJob(java.lang.String, groovy.lang.Closure).
That means we cannot trust the delegate type to select which customization to apply.
Closure foo = { if (getDelegate() instanceof javaposse.jobdsl.dsl.Job) { // label will generate 'assignedNode' / 'canRoam' elements label('XXX') } } // below XML is OK, FreeStyleProject has 'assignedNode' / 'canRoam' via AbstractProject freeStyleJob('A', foo) // below resulting XML does not match org.jenkinsci.plugins.workflow.job.WorkflowJob (does not extend AbstractProject) workflowJob('B', foo)
- is duplicated by
-
JENKINS-52743 authenticationToken has been deprecated.
- Closed
-
JENKINS-51044 Using non-pipeline directives in pipeline job definitions should result in warning or error
- Closed
-
JENKINS-53246 Regression in pipeline job features.
- Closed
- relates to
-
JENKINS-49820 'Do not allow concurrent builds' in pipeline sometimes fails
- Closed
-
JENKINS-56739 job-dsl 1.72: "No signature of method: javaposse.jobdsl.dsl.jobs.WorkflowJob.steps() is applicable for argument types..."
- Closed