-
New Feature
-
Resolution: Fixed
-
Major
-
None
-
-
Pipeline - December
Problem
If an input is used within a stage that uses an agent, it will block the agent from being used until the input proceeds.
stage('rollback') { agent { label 'deployer-agent' } steps { input 'should I rollback?' // blocks agent 'deployer-agent' } }
Solution
Introduce a input directive inside stage that blocks the stage from executing and acquiring the agent.
stage('rollback') { input { message 'should I rollback?' } agent { label 'deployer-agent' } steps { echo 'deploying' } }
This would be the same in scripted pipeline:
stage('rollback') { input 'should I rollback?' node ('deployer-agent') { echo 'deploying' } }
Full Syntax
input {
// Parameters are all the same as the input step. Only message is required.
message "Should we continue?"
id "some-id" // optional, defaults to stage name.
ok "For the OK button"
submitter "alice,bob"
submitterParameter "approver"
parameters {
// Same syntax as top-level parameters block
booleanParam(name: 'someParam', defaultValue: true, description: 'some description')
...
}
}
- is duplicated by
-
JENKINS-38394 Ability to set output of a step to environment variable(s)
-
- Closed
-
-
JENKINS-37515 RFE: input() blocks the executor in Declarative, add a stage attribute instead?
-
- Closed
-
-
JENKINS-41076 Improvements for 'when' section
-
- Closed
-
- relates to
-
JENKINS-57871 Input directive is blocking executor in declarative pipeline
-
- Open
-
-
JENKINS-49946 input step cannot access environment blocks
-
- Reopened
-
-
JENKINS-49947 unclear usage of input step in declarative pipeline
-
- Closed
-
-
JENKINS-48380 Block-scoped "wrapper" options for individual stages
-
- Closed
-
- links to