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?
question from:
https://stackoverflow.com/questions/65849888/how-do-i-use-a-hidden-parameter-in-a-jenkins-declarative-pipeline 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…