RousselTMLEARNING

TP · Azure DevOps: from discovery to expertise

Lab: Self-hosted agent and continuous integration pipeline

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
Mode :

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. 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 the Default pool.
  2. 2. Write the pipeline

    Why? Publishing results makes failures readable in the Tests tab, without reading logs.

    Create azure-pipelines.yml (pytest tests, PublishTestResults@2, artifact), push it and create the boutique-ci pipeline.
  3. 3. Block failing pull requests

    Why? Build validation tests the merge result before it reaches main.

    Add a build validation policy on main with boutique-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

  • ⏱ Estimated time : ≈ 45 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Questions about this lesson

No questions yet: be the first to ask for help or share your configuration.

Ask a question about this lesson →

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...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!