-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: pipeline-model-definition-plugin
I have been wondering for ages why is there no `timeout` option in the `input` step? I am aware you can wrap your input in a `timeout() {}`, but that is just impossible when you are using the `input` as part of the stage like so:
Â
pipeline {
agent any
stages {
stage('Example') {
input {
message "Should we continue?"
ok "Yes, we should."
submitter "alice,bob"
parameters {
string(name: 'PERSON', defaultValue: 'Mr Jenkins', description: 'Who should I say hello to?')
}
}
steps {
echo "Hello, ${PERSON}, nice to meet you."
}
}
}
}
Â
(Taken from https://jenkins.io/blog/2018/04/09/whats-in-declarative/#input)
Â
The possible "workaround" to this would be to create an `input` step in a previous stage which is wrapped in a `timeout` step, but in our case this makes things even more complicated and hard to read.Â
Are there any plans to include an `timeout` parameter for the `input` step? Maybe something like this (or better?):
Â
input {
message "Should we continue?"
ok "Yes, we should."
submitter "alice,bob"
timeout: [time: 1234, unit: 'MINUTES']
parameters {
string(
name: 'PERSON',
defaultValue: 'Mr Jenkins',
description: 'Who should I say hello to?'
)
}
}
Â
Â
- blocks
-
JENKINS-36235 Add optional 'timeout' parameter to 'input' step
-
- Resolved
-