0
0
Jenkinsdevops~10 mins

Build history and logs in Jenkins - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Build history and logs
Start Build
Build Executes
Log Output Generated
Build Completes
Store Build Result & Logs
User Views Build History & Logs
Analyze Success/Failure & Details
This flow shows how a Jenkins build runs, generates logs, stores results, and how users access the build history and logs.
Execution Sample
Jenkins
1. Trigger Jenkins build
2. Build runs and outputs logs
3. Build finishes with status
4. Logs and status saved
5. User views build history and logs
This sequence shows the steps from starting a build to viewing its history and logs in Jenkins.
Process Table
StepActionBuild StatusLog OutputUser View
1Build triggeredN/ANo logs yetBuild not listed yet
2Build runningIn ProgressLogs streaming liveBuild shows as running
3Build completesSuccessFull logs savedBuild shows as Success
4Logs storedSuccessLogs stored in JenkinsLogs accessible in build history
5User views historySuccessLogs displayed on UIUser sees build details and logs
6New build triggeredN/ANo logs yetNew build appears in history
💡 Build completes and logs are saved; user can view build history and logs anytime.
Status Tracker
VariableStartAfter Step 2After Step 3After Step 4After Step 5
Build StatusN/AIn ProgressSuccessSuccessSuccess
Log OutputNo logsStreaming logsFull logs savedStored logsDisplayed logs
User ViewNo buildBuild runningBuild successLogs accessibleLogs viewed
Key Moments - 3 Insights
Why does the build status show 'In Progress' before completion?
Because during step 2 in the execution_table, the build is running and logs are streaming live, so Jenkins marks the status as 'In Progress' until the build finishes.
How can users see logs if the build is still running?
At step 2, logs are streamed live, so users can view partial logs even before the build finishes, as shown in the 'Log Output' and 'User View' columns.
What happens to logs after the build completes?
After step 3 and 4, logs are fully saved and stored in Jenkins, making them accessible anytime in the build history, as shown in the 'Log Output' and 'User View' columns.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the build status at step 3?
ASuccess
BIn Progress
CFailed
DNot Started
💡 Hint
Check the 'Build Status' column at step 3 in the execution_table.
At which step does the user first see the build logs?
AStep 1
BStep 2
CStep 4
DStep 5
💡 Hint
Look at the 'User View' and 'Log Output' columns in the execution_table to find when logs start streaming.
If the build fails at step 3, how would the 'Build Status' change in the variable_tracker?
AIt would show 'In Progress'
BIt would remain 'Success'
CIt would change to 'Failed'
DIt would be 'N/A'
💡 Hint
Refer to the 'Build Status' row in variable_tracker and consider what happens when a build fails.
Concept Snapshot
Jenkins Build History & Logs:
- Build starts and runs, generating logs live
- Logs and status saved after build completes
- Users access build history to see past builds
- Logs help analyze success or failure
- History shows build status and details
Full Transcript
In Jenkins, when you start a build, it runs and creates logs as it goes. The build status shows as 'In Progress' while running. Once finished, Jenkins saves the logs and marks the build as 'Success' or 'Failed'. Users can then view the build history and logs anytime to check what happened. Logs are streamed live during the build, so you can watch progress. This helps you understand if your build worked or if there were errors.