How do `input` steps and manual approvals work in Jenkins?

IntermediateConceptJenkins
Answer

The input step pauses the pipeline until a user clicks Proceed or Abort, optionally restricted to specific users via submitter and optionally collecting parameters. Put it inside a stage with agent none or after leaving the node block; otherwise the pipeline holds an executor while waiting. Add a timeout so abandoned pipelines do not hang forever.

stage('Approve') {
  agent none
  steps {
    timeout(time: 2, unit: 'HOURS') {
      input message: 'Deploy to production?', submitter: 'release-managers'
    }
  }
}
All CI/CD questions

More on Jenkins