Skip to content

Commit e1ad981

Browse files
committed
Add boolean param
1 parent a088826 commit e1ad981

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Jenkinsfile-input

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,22 @@ pipeline {
5858
}
5959
}
6060

61+
stage('param-boolean'){
62+
steps{
63+
script{
64+
result = input message: 'Please input the git branch name with debug info!', ok: 'Confirm',
65+
parameters: [string(defaultValue: 'master',
66+
description: 'The branch name of git repo', name: 'branchName', trim: true),
67+
string(defaultValue: 'debug info',
68+
description: 'Output the debug info', name: 'debugInfo', trim: true),
69+
booleanParam(defaultValue: false, description: 'Run this Pipeline in debug mode.', name: 'debug')]
70+
71+
git branch: result.branchName, url: 'https://github.com/devops-workspace/demo-junit'
72+
echo result.debugInfo
73+
}
74+
}
75+
}
76+
6177
}
6278
}
6379

0 commit comments

Comments
 (0)