What you will learn in this TP
- Install a self-hosted agent
- Write a YAML test pipeline
- Publish test results and artifacts
- Add build validation
All steps and instructions are shown. Recommended for this lab: semi-guided
Introduction #
Context. The new organization has no hosted agent time yet. You install your own agent and set up continuous integration.
Prerequisites: a free Azure DevOps organization, the Azure CLI (azure-devops extension), Git and Python 3, the Lab 1 project, Docker · Estimated time: 45 min
An online agent, a pipeline that publishes test results and blocks failing pull requests.Setup #
Guided steps, with their solution.
1. Install the agent
Why? A self-hosted agent is free and available right away.
Create a PAT limited to Agent Pools (read, manage), then download, configure and start the agent in theDefaultpool.2. Write the pipeline
Why? Publishing results makes failures readable in the Tests tab, without reading logs.
Createazure-pipelines.yml(pytest tests,PublishTestResults@2, artifact), push it and create theboutique-cipipeline.3. Block failing pull requests
Why? Build validation tests the merge result before it reaches main.
Add a build validation policy onmainwithboutique-ci, then open a pull request that breaks a test.
Validate your work
Check that each goal above is reached and that you get the result described in the introduction.
Difficulty level : ●●●○○ (3/5)
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
Azure YAML pipelines: stages, tasks, variables and templates
Writing Azure pipelines in YAML: trigger and pr triggers, stages, jobs and steps, versioned tasks...
Azure Pipelines agents: hosted, self-hosted and managed pools
Choosing and running Azure Pipelines agents: Microsoft-hosted agents and images, self-hosted agen...
End-to-end CI/CD (1/5): principles and anatomy of a pipeline
Understand end-to-end CI/CD: continuous integration, continuous delivery and continuous deploymen...
End-to-end CI/CD (2/5): continuous integration, testing and quality
Succeed with continuous integration: the test pyramid, unit, integration, contract and end-to-end...
GitLab CI/CD: concepts and architecture
Discover GitLab CI/CD: the DevSecOps platform, the .gitlab-ci.yml file, pipelines, stages and job...
GitHub Actions: concepts and how it works
Discover GitHub Actions: events, workflows, jobs, steps and actions, the Marketplace, hosted runn...
GitHub Actions runners: hosted, self-hosted and ARC
Choosing where workflows run: hosted runners and images, larger runners, self-hosted runners (ins...
End-to-end CI/CD (5/5): GitHub Actions, GitLab CI, Jenkins and Argo CD in practice
Compare and use CI/CD tools: GitHub Actions, GitLab CI, Jenkins, Argo CD and Flux; a complete pip...
Deploying with Azure Pipelines: environments, approvals and service connections
Delivering with Azure Pipelines: multi-stage pipelines, environments, approvals and checks, deplo...