-
Improvement
-
Resolution: Duplicate
-
Minor
It would be nice to improve when section in stage pipeline when user input and timeout.
Currently we have to write code like this:
when { boolean publish try { timeout(time: 1, unit: 'MINUTES') { input 'Deploy pages?' publish = true } } catch (final ignore) { publish = false } publish }
Which is:
- very long
- bad practise (catch and ignore)
- unclear
My proposition is to make additional clause, which could look like this:
when { input message: 'Deploy pages?', time: 1, unit: 'MINUTES', failWhenTimeout: false }
Default parameters could be:
- message: Proceed or Abort?
- time: 5
- unit: MINUTES
- failWhenTimeout: false
- duplicates
-
JENKINS-48379 Input/parameters for Stages
- Closed