代码拉取完成,页面将自动刷新
pipeline {
agent any
stages{
stage('simple'){
steps{
input message: 'Please input your name!', ok: 'Confirm',
parameters: [string(defaultValue: 'rick',
description: 'This should not be your real name.', name: 'name', trim: true)]
}
}
stage('complex'){
parallel {
stage('channel-1'){
steps{
input message: 'Please input your age!', ok: 'Confirm',
parameters: [string(defaultValue: '18',
description: 'Just a joke.', name: 'age', trim: true)]
}
}
stage('channel-2'){
steps{
input message: 'Please input your weight!', ok: 'Confirm',
parameters: [string(defaultValue: '50',
description: 'Just a joke.', name: 'weight', trim: true)]
}
}
}
}
stage('use result'){
parallel {
stage('one param'){
steps{
script{
result = input message: 'Please input the git branch name!', ok: 'Confirm',
parameters: [string(defaultValue: 'master',
description: 'The branch name of git repo', name: 'branchName', trim: true)]
git branch: result, url: 'https://github.com/devops-workspace/demo-junit'
}
}
}
stage('multi-param'){
steps{
script{
result = input message: 'Please input the git branch name with debug info!', ok: 'Confirm',
parameters: [string(defaultValue: 'master',
description: 'The branch name of git repo', name: 'branchName', trim: true),
string(defaultValue: 'debug info',
description: 'Output the debug info', name: 'debugInfo', trim: true)]
git branch: result.branchName, url: 'https://github.com/devops-workspace/demo-junit'
echo result.debugInfo
}
}
}
stage('param-boolean'){
steps{
script{
result = input message: 'Please input the git branch name with debug info!', ok: 'Confirm',
parameters: [string(defaultValue: 'master',
description: 'The branch name of git repo', name: 'branchName', trim: true),
string(defaultValue: 'debug info',
description: 'Output the debug info', name: 'debugInfo', trim: true),
booleanParam(defaultValue: false, description: 'Run this Pipeline in debug mode.', name: 'debug')]
git branch: result.branchName, url: 'https://github.com/devops-workspace/demo-junit'
echo result.debugInfo
}
}
}
}
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。