Building an Azure DevOps build pipeline with the default agent

Introduction

In this blog post, we are going to build the build pipeline of the PartsUnlimited Microsoft Azure DevOps project which we created in a previous blog post. Please note that we are going to use the default-free build server available at the project creation to try this build, and this build fails due to the lack of a free capable server (No hosted parallelism has been purchased or granted.). Even though this exercise fails it is a good opportunity to learn the terms associated with build pipelines, which is going to be handy when we are going to create a build server based on an Azure VM and use it to run the build pipeline.

Prerequisites 

1. You need an Azure DevOps project with a build pipeline and a build server. We are going to use the PartsUnlimited project we created in an earlier post which meets these criteria.

Steps

1. Navigate to dev.azure.com, and navigate into your project with the build pipeline.

2. Navigate to pipelines from the menu on the left-hand side, as shown in the below image.

3. You will see the build pipeline as follows.

4. Click on the "PartsUnlimitedE2E" pipeline.

5. Click on "Edit" near the top right corner of the above page.

6. This is the configuration of the build pipeline. In this post, we are only going to focus on running the pipeline on the default agent. On the right-hand side, you can see the "Agent pool" field with the value "Azure Pipelines". We are going to navigate into this agent pool to see if there are any running agents. To do this click on the "Pool Information" link.

7. Clicking on the "Pool Information" link will lead us to the details page of the pool, which contains a link to the agent pool settings page. Click on the "Provide custom pool information using agent pool settings." link to get to the agent pool settings page.

8. Click on the "Agents" button to see a list of agents and their status. You will see that the "Hosted Agent" agent is available and online. We will try to run the build pipeline on this agent.

9. Go back to the "PartsUnlimitedE2E" pipeline, shown in step 4 and click "Run Pipeline". This will prompt you to the following screen. 

10. Accept default values to the fields on the previous page and click "Run", which will lead to the following page.

11. Click on the "Phase 1" job at the bottom of the above page to see job details. After some time the Icon next to the "Phase 1" job will turn into a red cross as shown in the following image and error message "##[error]No hosted parallelism has been purchased or granted. To request a free parallelism grant, please fill out the following form https://aka.ms/azpipelines-parallelism-request" will be shown.

This concludes this post on running the PartsUnlimited build pipeline on the default build server. Microsoft has changed the access to free build servers [1], and as a result, new projects cannot build pipelines using free servers. Fortunately, there are many different ways we can create a build agent to run the pipeline on, which we are going to explore in later posts.


[1] https://docs.microsoft.com/en-us/azure/devops/release-notes/2021/sprint-183-update#change-in-process-for-obtaining-free-pipelines-grant-in-public-projects

Comments

Popular posts from this blog

Running a Docker build agent on Azure Kubernetes Service (AKS)

Azure DevOps Docker DotNet Build Agent

Building Azure DevOps pipelines with a Docker agent