Book Image

Implementing CI/CD Using Azure Pipelines

By : Piti Champeethong, Roberto Mardeni
5 (1)
Book Image

Implementing CI/CD Using Azure Pipelines

5 (1)
By: Piti Champeethong, Roberto Mardeni

Overview of this book

Continuous integration and continuous delivery (CI/CD) are ubiquitous concepts in modern development. Azure Pipelines is one of the most popular services that you can utilize for CI/CD, and this book shows you how it works by taking you through the process of building and automating CI/CD systems using Azure Pipelines and YAML, simplifying integration with Azure resources and reducing human error. You’ll begin by getting an overview of Azure Pipelines and why you should use it. Next, the book helps you get to grips with build and release pipelines, and then builds upon this by introducing the extensive power of YAML syntax, which you can use to implement and configure any task you can think of. As you advance, you’ll discover how to integrate Infrastructure as Code tools, such as Terraform, and perform code analysis with SonarQube. In the concluding chapters, you’ll delve into real-life scenarios and hands-on implementation tasks with Microsoft Azure services, AWS, and cross-mobile application with Flutter, Google Firebase, and more. By the end of this book, you’ll be able to design and build CI/CD systems using Azure Pipelines with consummate ease, write code using YAML, and configure any task that comes to mind.
Table of Contents (18 chapters)
1
Part 1:Getting Started with Azure Pipelines
6
Part 2:Azure Pipelines in Action
11
Part 3:CI/CD for Real-World Scenarios
15
Chapter 12: Navigating Common Pitfalls and Future Trends in Azure Pipelines

Setting up agent pools

Before using Azure Pipelines to build code and deploy code, you need at least one build agent. There are two build agent types: Microsoft-hosted build agent, which is included by default, and self-hosted build agent. Each agent type will be located under an agent pool, which is a collection of build and release agents.

A Microsoft-hosted build agent will be located under an agent pool called Azure Pipelines. You can create a new agent pool for self-hosted build agents and assign them under it.

To create pools, follow these steps:

  1. Click on your project name in the web portal and click Project settings | Agent pools | Add pool:
Figure 1.10 – Adding a pool

Figure 1.10 – Adding a pool

  1. Enter the information shown in the following screenshot and then click Create:
Figure 1.11 – Creating an agent pool

Figure 1.11 – Creating an agent pool

  1. Finally, you will see the new agent pool:
Figure 1.12 – Displaying the new agent pool

Figure 1.12 – Displaying the new agent pool

Once you’ve finished creating the new agent pool, you can start creating and setting up the self-hosted agent under a new agent pool. The following section will show you how to create a personal access token (PAT).