0
0
Azurecloud~10 mins

Azure Pipelines overview - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Azure Pipelines overview
Code Commit Trigger
Pipeline Starts
Build Stage
Test Stage
Deploy Stage
Pipeline Ends
This flow shows how Azure Pipelines runs automatically when code is committed, then builds, tests, and deploys the application step-by-step.
Execution Sample
Azure
trigger:
  - main

pool:
  vmImage: 'ubuntu-latest'

steps:
  - script: echo Hello, Azure Pipelines!
This pipeline triggers on commits to main, runs on an Ubuntu VM, and prints a greeting message.
Process Table
StepActionEvaluationResult
1Detect commit on 'main' branchCommit on 'main'?Yes, pipeline triggered
2Allocate VM from pool 'ubuntu-latest'VM available?VM allocated
3Run script stepExecute 'echo Hello, Azure Pipelines!'Output: Hello, Azure Pipelines!
4Complete pipelineAll steps done?Pipeline succeeded
💡 Pipeline ends after all steps complete successfully
Status Tracker
VariableStartAfter Step 1After Step 2After Step 3Final
Pipeline StatusNot startedTriggeredRunningRunningSucceeded
VM StatusNoneNoneAllocatedAllocatedReleased
Script OutputNoneNoneNoneHello, Azure Pipelines!Hello, Azure Pipelines!
Key Moments - 3 Insights
Why does the pipeline start only when code is committed to 'main'?
Because the trigger is set to the 'main' branch, as shown in execution_table row 1, so only commits there start the pipeline.
What happens if the VM is not available?
The pipeline would wait or fail at step 2 in execution_table because it cannot allocate the VM to run the steps.
Why is the script output important?
It shows the pipeline ran the commands correctly, as seen in execution_table step 3 and variable_tracker Script Output.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is the pipeline status after step 2?
ATriggered
BRunning
CSucceeded
DNot started
💡 Hint
Check the 'Pipeline Status' row in variable_tracker after Step 2
At which step does the pipeline print 'Hello, Azure Pipelines!'?
AStep 3
BStep 1
CStep 2
DStep 4
💡 Hint
Look at the 'Script Output' in variable_tracker and execution_table step 3
If the trigger was changed to 'develop' branch, what would happen?
APipeline triggers on all branches
BPipeline triggers on commits to 'main' branch
CPipeline triggers on commits to 'develop' branch
DPipeline never triggers
💡 Hint
Refer to execution_table step 1 about branch triggers
Concept Snapshot
Azure Pipelines run automatically on code commits.
They use a VM to build, test, and deploy.
Triggers specify which branch starts the pipeline.
Steps run in order: build, test, deploy.
Pipeline status updates as steps complete.
Full Transcript
Azure Pipelines start when code is committed to a specified branch, like 'main'. The pipeline allocates a virtual machine to run tasks. It runs steps such as building the code, testing it, and deploying the application. Each step updates the pipeline status. The example pipeline prints a message to show it ran successfully. If the VM is unavailable, the pipeline waits or fails. Changing the trigger branch changes when the pipeline runs.