0
0
Jenkinsdevops~10 mins

Input step for manual approval in Jenkins - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Input step for manual approval
Pipeline reaches input step
Pause execution, wait for user
User sees prompt in Jenkins UI
User clicks Approve or Abort
Approve
Continue
The pipeline pauses at the input step, waits for a user to approve or abort, then continues or stops based on the choice.
Execution Sample
Jenkins
pipeline {
  agent any
  stages {
    stage('Approval') {
      steps {
        input 'Approve deployment?'
      }
    }
  }
}
This Jenkins pipeline pauses at the input step asking for manual approval before continuing.
Process Table
StepPipeline StateActionUser InteractionResult
1Running before inputReach input stepNoPipeline pauses, waiting
2Paused at inputWait for userYes - prompt shownUser sees approval prompt
3Paused at inputUser clicks ApproveYes - user approvesPipeline resumes execution
4Running after inputContinue pipelineNoNext stages run
5Paused at inputUser clicks AbortYes - user abortsPipeline stops with failure
💡 Pipeline stops or continues based on user approval or abort action
Status Tracker
VariableStartAfter Step 1After Step 2After Step 3Final
pipeline_stateNot startedRunning before inputPaused at inputRunning after inputCompleted or Aborted
Key Moments - 3 Insights
Why does the pipeline pause and not continue automatically?
Because the input step waits for manual approval, as shown in execution_table row 1 and 2, the pipeline pauses until the user responds.
What happens if the user clicks Abort instead of Approve?
As shown in execution_table row 5, the pipeline stops immediately with failure and does not continue.
Can the pipeline continue without user interaction at the input step?
No, the pipeline stays paused at the input step until the user approves or aborts, as seen in execution_table rows 2 and 3.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is the pipeline state after the user clicks Approve?
APaused at input
BRunning after input
CStopped
DNot started
💡 Hint
Check execution_table row 3 and 4 for pipeline state after approval
At which step does the pipeline show the approval prompt to the user?
AStep 2
BStep 4
CStep 1
DStep 5
💡 Hint
Look at execution_table row 2 where user interaction is 'Yes - prompt shown'
If the user aborts at the input step, what is the pipeline result?
APipeline continues to next stage
BPipeline pauses indefinitely
CPipeline stops with failure
DPipeline restarts
💡 Hint
See execution_table row 5 for user abort action result
Concept Snapshot
Jenkins input step pauses pipeline for manual approval.
Pipeline waits until user approves or aborts.
Approve resumes pipeline; abort stops it.
Used to add human checks in automated flows.
Syntax: input 'Prompt message'.
Full Transcript
In Jenkins pipelines, the input step pauses the pipeline execution and waits for a manual approval from a user. When the pipeline reaches this step, it stops and shows a prompt in the Jenkins user interface. The user can then choose to approve or abort the pipeline. If approved, the pipeline continues running the next stages. If aborted, the pipeline stops immediately with failure. This allows adding human checks in automated processes to prevent unwanted deployments or actions. The pipeline state changes from running to paused at the input step, then back to running or stopped based on user choice.