0
0
Azurecloud~10 mins

Build pipeline basics in Azure - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Build pipeline basics
Start: Code Commit
Trigger Build Pipeline
Checkout Source Code
Run Build Tasks
Run Tests
Publish Artifacts
Build Pipeline Complete
This flow shows how a build pipeline starts from code commit, runs build and test tasks, then publishes artifacts.
Execution Sample
Azure
trigger:
  - main

pool:
  vmImage: 'ubuntu-latest'

steps:
  - script: echo Building project
A simple Azure build pipeline triggered on main branch that runs a build script on Ubuntu.
Process Table
StepActionDetailsResult
1Trigger pipelineCode pushed to main branchPipeline starts
2Checkout codeGet latest source from repoSource code available
3Run build scriptExecute 'echo Building project'Output: Building project
4Run testsNo tests definedSkipped
5Publish artifactsNo artifacts definedSkipped
6CompletePipeline finished successfullySuccess
💡 Pipeline ends after all steps complete successfully
Status Tracker
VariableStartAfter Step 2After Step 3After Step 6
pipeline_statusNot startedRunningRunningSucceeded
source_codenullChecked outChecked outChecked out
build_outputnullnullBuilding projectBuilding project
Key Moments - 2 Insights
Why does the pipeline start automatically after code is pushed?
Because the trigger is set to the main branch, so any push to main starts the pipeline (see execution_table step 1).
What happens if no tests or artifacts are defined?
Those steps are skipped but the pipeline still completes successfully (see execution_table steps 4 and 5).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is the pipeline status after step 3?
ARunning
BSucceeded
CFailed
DNot started
💡 Hint
Check the 'pipeline_status' variable in variable_tracker after Step 3
At which step does the source code become available?
AStep 1
BStep 3
CStep 2
DStep 4
💡 Hint
Look at the 'source_code' variable in variable_tracker after Step 2
If tests were added, which step would change in the execution table?
AStep 3
BStep 4
CStep 5
DStep 6
💡 Hint
Step 4 is where tests run according to the execution_table
Concept Snapshot
Build pipeline basics in Azure DevOps:
- Trigger on code push (e.g., main branch)
- Checkout source code
- Run build scripts
- Run tests (optional)
- Publish artifacts (optional)
- Pipeline ends with success or failure
Full Transcript
A build pipeline in Azure DevOps starts automatically when code is pushed to a specified branch, like main. The pipeline first checks out the latest source code, then runs build tasks such as scripts. If tests are defined, it runs them next. After that, it publishes build artifacts if configured. Finally, the pipeline completes successfully if all steps pass. If tests or artifacts are missing, those steps are skipped but the pipeline still finishes. Variables like pipeline status and build output change as the pipeline progresses through each step.