Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Release pipeline basics
📖 Scenario: You work in a software team that wants to automate the deployment of their web app. To do this, you will create a simple release pipeline in Azure DevOps. This pipeline will take the built app and deploy it to a test environment automatically.
🎯 Goal: Build a basic Azure DevOps release pipeline with one stage that deploys an app artifact to a test environment.
📋 What You'll Learn
Create a release pipeline definition with a name
Add an artifact source named exactly 'drop'
Add a stage named exactly 'Test'
Configure the stage to deploy the artifact
💡 Why This Matters
🌍 Real World
Release pipelines automate deploying software to environments, saving time and reducing errors.
💼 Career
Understanding release pipelines is essential for DevOps engineers and cloud infrastructure specialists to manage software delivery.
Progress0 / 4 steps
1
Create the release pipeline definition
Create a YAML variable called releasePipeline that defines a release pipeline with the name 'MyReleasePipeline' and an empty stages list.
Azure
Hint
Use a Python dictionary with keys 'name', 'artifacts', and 'stages'.
2
Add an artifact source
Add an artifact to releasePipeline['artifacts'] with the exact name 'drop' and type 'Build'.
Azure
Hint
Add a dictionary with keys 'alias' and 'type' inside the 'artifacts' list.
3
Add a deployment stage
Add a stage to releasePipeline['stages'] with the exact name 'Test' and a job that deploys the artifact named 'drop'.
Azure
Hint
The stage should have a 'jobs' list with one deployment job referencing the 'drop' artifact.
4
Complete the release pipeline configuration
Add a trigger key to releasePipeline with the value {'batch': False} to disable batch triggering.
Azure
Hint
The trigger key controls how releases start automatically.
Practice
(1/5)
1. What is the main purpose of a release pipeline in Azure DevOps?
easy
A. To monitor user activity on a website
B. To automate the delivery of applications through different stages
C. To write code for applications
D. To store application data securely
Solution
Step 1: Understand the role of a release pipeline
A release pipeline automates the process of delivering software through stages like testing and production.
Step 2: Identify the correct purpose
Among the options, only automating delivery matches the release pipeline's function.
Final Answer:
To automate the delivery of applications through different stages -> Option B
A. 'dependsOn' should be inside the stage, not inside jobs
B. 'dependsOn' must be a job, not a stage
C. The 'steps' section cannot have multiple scripts
D. The 'jobs' keyword is not allowed inside stages
Solution
Step 1: Locate 'dependsOn' usage
'dependsOn' controls stage dependencies and must be placed at the stage level, not inside jobs.
Step 2: Identify correct placement
In the snippet, 'dependsOn: Build' is incorrectly placed inside the job, it should be directly under the stage.
Final Answer:
'dependsOn' should be inside the stage, not inside jobs -> Option A
Quick Check:
'dependsOn' belongs to stage level [OK]
Hint: 'dependsOn' goes under stage, not job [OK]
Common Mistakes:
Placing 'dependsOn' inside jobs instead of stages
Thinking 'dependsOn' applies to jobs only
Believing multiple scripts in steps is invalid
5. You want to create a release pipeline with two stages: Build and Deploy. Deploy should only run if Build succeeds. Which YAML snippet correctly sets this up?