Process Flow - Steps within stages
Start Pipeline
Enter Stage
Execute Step 1
Execute Step 2
Execute Last Step
Exit Stage
Next Stage or End Pipeline
The pipeline starts, enters a stage, runs each step in order, then exits the stage and moves on.
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Compiling code'
sh 'make build'
}
}
}
}| Step | Action | Command/Message | Result/Output |
|---|---|---|---|
| 1 | Enter Stage | Build | Stage 'Build' started |
| 2 | Execute Step | echo 'Compiling code' | Prints: Compiling code |
| 3 | Execute Step | sh 'make build' | Runs build command, outputs build logs |
| 4 | Exit Stage | Build | Stage 'Build' completed |
| Variable | Start | After Step 2 | After Step 3 | Final |
|---|---|---|---|---|
| Stage Status | Not started | Running | Running | Completed |
| Build Output | None | Compiling code printed | Build logs generated | Build logs available |
Jenkins pipeline stages contain steps. Steps run one by one inside a stage. Each step executes a command or action. If a step fails, the stage stops. Stages help organize pipeline tasks clearly.