How Do I Use a Hidden Parameter in a Jenkins Declarative Pipeline

Viewed 2253

I am attempting to pass parameters that are defined in a Jenkins configuration to a declarative pipeline. When I do this with the built in string, everything works fine:

string(name: 'rv', defaultValue: 'none', description: 'the release version')

Since these value should not be edited by the user in the Build with Parameters screen, I switched to using the hidden parameter plugin:

hidden(name: 'rv', defaultValue: 'none', description: 'the release version')

But this gives me an error when the pipeline script is run:

WorkflowScript: 30: Invalid parameter type "hidden". Valid parameter types: [booleanParam, buildSelector, choice, credentials, file, gitParameter, text, password, run, string]

Is there a method by which I can use the hidden parameter in a declarative Jenkins pipeline?

0 Answers
Related