jenkinsci / persistent-parameter-plugin

https://plugins.jenkins.io/persistent-parameter/
MIT License
7 stars 11 forks source link

Getting an error in a seed job declarative pipeline #14

Open bkarakashev opened 3 years ago

bkarakashev commented 3 years ago

Version report

Jenkins and plugins versions report: Jenkins v2.277.4 persistent-parameter-plugin v1.3

I am trying to add this in a seed job but I am getting this error:

Processing DSL script nonprod_deploy.jenkins
ERROR: (nonprod_deploy.jenkins, line 30) No signature of method: javaposse.jobdsl.dsl.helpers.BuildParametersContext.persistentBoolean() is applicable for argument types: (java.util.LinkedHashMap) values: [[name:Boolean, defaultValue:true, description:A boolean parameter, ...]]
Finished: FAILURE

Any idea what I am doing wrong?

This is my code:

...
    parameters {
        persistentBoolean(name: 'Boolean', defaultValue: true, description: 'A boolean parameter', successfulOnly: false)
    }
...

However, this works no problem: https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.helpers.BuildParametersContext.booleanParam

ro-kr commented 2 years ago

I guess this is a limitation of the Jenkins Job DSL plugin, it only supports the parameter types listed here: https://jenkinsci.github.io/job-dsl-plugin/#path/job-parameters