jenkins input 框
Posted pythonwork
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jenkins input 框相关的知识,希望对你有一定的参考价值。
node {
stage ‘S1‘
// Define an input step and capture the outcome from it.
def outcome = input id: ‘Run-test-suites‘,
message: ‘Workflow Configuration‘,
ok: ‘Okay‘,
parameters: [
[
$class: ‘BooleanParameterDefinition‘,
defaultValue: true,
name: ‘Run test suites?‘,
description: ‘A checkbox option‘
],
[
$class: ‘StringParameterDefinition‘,
defaultValue: "Hello",
name: ‘Enter some text‘,
description: ‘A text option‘
],
[
$class: ‘PasswordParameterDefinition‘,
defaultValue: "MyPasswd",
name: ‘Enter a password‘,
description: ‘A password option‘
],
[
$class: ‘ChoiceParameterDefinition‘, choices: ‘Choice 1
Choice 2
Choice 3‘,
name: ‘Take your pick‘,
description: ‘A select box option‘
]
]
stage ‘S2‘
// Echo the outcome values so they can be checked fro in the test. This will help
// verify that input submit/proceed worked properly.
echo "P1: ${outcome.get(‘Run test suites?‘)}"
echo "P2: ${outcome.get(‘Enter some text‘)}"
echo "P3: ${outcome.get(‘Enter a password‘)}"
echo "P4: ${outcome.get(‘Take your pick‘)}"
}
以上是关于jenkins input 框的主要内容,如果未能解决你的问题,请参考以下文章