Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.8k views
in Technique[技术] by (71.8m points)

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

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...