@@ -30,14 +30,34 @@ pipeline {
3030 }
3131
3232 stage('use result'){
33- steps{
34- script{
35- result = input message: 'Please input the git branch name!', ok: 'Confirm',
36- parameters: [string(defaultValue: 'master',
37- description: 'The branch name of git repo', name: 'branchName', trim: true)]
38-
39- git branch: result.branchName, url: 'https://github.com/devops-workspace/demo-junit'
33+ parallel {
34+ stage('one param'){
35+ steps{
36+ script{
37+ result = input message: 'Please input the git branch name!', ok: 'Confirm',
38+ parameters: [string(defaultValue: 'master',
39+ description: 'The branch name of git repo', name: 'branchName', trim: true)]
40+
41+ git branch: result, url: 'https://github.com/devops-workspace/demo-junit'
42+ }
43+ }
44+ }
45+
46+ stage('multi-param'){
47+ steps{
48+ script{
49+ result = input message: 'Please input the git branch name!', ok: 'Confirm',
50+ parameters: [string(defaultValue: 'master',
51+ description: 'The branch name of git repo', name: 'branchName', trim: true),
52+ string(defaultValue: 'debug info',
53+ description: 'Output the debug info', name: 'debugInfo', trim: true)]
54+
55+ git branch: result.branchName, url: 'https://github.com/devops-workspace/demo-junit'
56+ echo result.debugInfo
57+ }
58+ }
4059 }
60+
4161 }
4262 }
4363
0 commit comments