Project 6: Creating a CI/CD Pipeline in Azure DevOps
Introduction In this project, I learned how to create a Continuous Integration (CI) and Continuous Deployment (CD) pipeline using Azure DevOps. This project allowed me to automate the process of integrating code changes, running tests, and deploying applications. The ultimate goal was to streamline my development and deployment workflow, ensuring faster and more reliable software delivery. By the end of this project, I learned how to: Set up a Git repository in Azure DevOps. Create build pipelines to automate the building and testing of my application. Let me walk you through the steps I followed to set up my CI/CD pipeline. Step-by-Step Guide Step 1: Set Up Azure DevOps 1️⃣ Create an Azure DevOps Account: I created an account on Azure DevOps using my Microsoft account. 2️⃣ Create a New Azure DevOps Organization: In Azure DevOps, I created a new organization to manage my projects. I clicked on Create a new organization and followed the setup instructions. 3️⃣ Create a New Project: After creating the organization, I created a new project within Azure DevOps. I named the project MyAppCI-CD and set the visibility to Private. Step 2: Set Up the Repository 1️⃣ Create a Git Repository: Inside the newly created project, I went to the Repos tab. I clicked on Initialize to create a new repository. I uploaded my existing C# code that retrieves a file from an Azure Storage account. Step 3: Create the Build Pipeline 1️⃣ Navigate to Pipelines: In Azure DevOps, I went to the Pipelines section and clicked on Create Pipeline. 2️⃣ Select the Repository: I chose the repository where my code was stored (it was a GitHub repository in my case). 3️⃣ Define the Pipeline: Azure DevOps automatically suggested a pipeline template based on the type of application I was working with (a .NET application). I opted to go with the YAML pipeline to have more control over my build process. 4️⃣ Configure Build Steps: I added the necessary steps to compile and test my code: Install Dependencies: I used the dotnet restore command to restore all the necessary packages. Build the Application: I ran the dotnet build command to compile the application. Run Tests: I executed the dotnet test command to run unit tests and ensure everything was working correctly. These steps helped ensure that my code was properly compiled, dependencies were restored, and the application was thoroughly tested before moving on to deployment. 5️⃣ Save and Run the Pipeline: I saved the pipeline and clicked Run to trigger a build. The pipeline would automatically trigger every time I pushed changes to the repository. 6️⃣ Verify Build Results: After the build completed, I went to the Pipelines tab in Azure DevOps to verify the build result. If the build succeeded, I could proceed to set up the release pipeline. Troubleshooting: Parallelism Error While setting up the build pipeline, I encountered the following 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. This error occurred because Azure DevOps requires a public project for free parallelism or additional parallelism licenses. I realized that to solve this, I needed to set my Azure DevOps project to public. Here’s how I resolved the issue: Enable Public Projects at the Organization Level: I navigated to Organization Settings. Under Security → Policies, I enabled the option to allow public projects. Change Project Visibility: I went to the project settings. Under Overview, I changed the Visibility setting from Private to Public. I saved the changes. However, despite setting the project to public, I received the following error again: 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. This issue likely occurred because the public project needed more parallelism than the default provided by Azure DevOps. At this point, I decided to put the project on hold while I worked on other tasks. Step 4: Conclusion By completing this project, I learned how to: Create a Git repository in Azure DevOps to store my code. Set up a build pipeline to automate the process of compiling code, running tests, and generating artifacts. Troubleshoot parallelism errors in Azure DevOps when running build pipelines. While I couldn’t finish the pipeline due to the parallelism issue, I gained valuable insights into how CI/CD pipelines are set up and the importance of configuring them properly to ensure efficient software delivery. I plan to revisit the project after resolving the parallelism issues. Credits: Azure Project Ideas

Introduction
In this project, I learned how to create a Continuous Integration (CI) and Continuous Deployment (CD) pipeline using Azure DevOps. This project allowed me to automate the process of integrating code changes, running tests, and deploying applications. The ultimate goal was to streamline my development and deployment workflow, ensuring faster and more reliable software delivery.
By the end of this project, I learned how to:
- Set up a Git repository in Azure DevOps.
- Create build pipelines to automate the building and testing of my application.
Let me walk you through the steps I followed to set up my CI/CD pipeline.
Step-by-Step Guide
Step 1: Set Up Azure DevOps
1️⃣ Create an Azure DevOps Account:
- I created an account on Azure DevOps using my Microsoft account.
2️⃣ Create a New Azure DevOps Organization:
- In Azure DevOps, I created a new organization to manage my projects. I clicked on Create a new organization and followed the setup instructions.
3️⃣ Create a New Project:
- After creating the organization, I created a new project within Azure DevOps. I named the project MyAppCI-CD and set the visibility to Private.
Step 2: Set Up the Repository
1️⃣ Create a Git Repository:
- Inside the newly created project, I went to the Repos tab.
- I clicked on Initialize to create a new repository.
- I uploaded my existing C# code that retrieves a file from an Azure Storage account.
Step 3: Create the Build Pipeline
1️⃣ Navigate to Pipelines:
- In Azure DevOps, I went to the Pipelines section and clicked on Create Pipeline.
2️⃣ Select the Repository:
- I chose the repository where my code was stored (it was a GitHub repository in my case).
3️⃣ Define the Pipeline:
- Azure DevOps automatically suggested a pipeline template based on the type of application I was working with (a .NET application). I opted to go with the YAML pipeline to have more control over my build process.
4️⃣ Configure Build Steps:
- I added the necessary steps to compile and test my code:
-
Install Dependencies: I used the
dotnet restore
command to restore all the necessary packages. -
Build the Application: I ran the
dotnet build
command to compile the application. -
Run Tests: I executed the
dotnet test
command to run unit tests and ensure everything was working correctly.
-
Install Dependencies: I used the
These steps helped ensure that my code was properly compiled, dependencies were restored, and the application was thoroughly tested before moving on to deployment.
5️⃣ Save and Run the Pipeline:
- I saved the pipeline and clicked Run to trigger a build. The pipeline would automatically trigger every time I pushed changes to the repository.
6️⃣ Verify Build Results:
- After the build completed, I went to the Pipelines tab in Azure DevOps to verify the build result. If the build succeeded, I could proceed to set up the release pipeline.
Troubleshooting: Parallelism Error
While setting up the build pipeline, I encountered the following 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.
This error occurred because Azure DevOps requires a public project for free parallelism or additional parallelism licenses. I realized that to solve this, I needed to set my Azure DevOps project to public.
Here’s how I resolved the issue:
-
Enable Public Projects at the Organization Level:
- I navigated to Organization Settings.
- Under Security → Policies, I enabled the option to allow public projects.
-
Change Project Visibility:
- I went to the project settings.
- Under Overview, I changed the Visibility setting from Private to Public.
- I saved the changes.
However, despite setting the project to public, I received the following error again:
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.
This issue likely occurred because the public project needed more parallelism than the default provided by Azure DevOps. At this point, I decided to put the project on hold while I worked on other tasks.
Step 4: Conclusion
By completing this project, I learned how to:
- Create a Git repository in Azure DevOps to store my code.
- Set up a build pipeline to automate the process of compiling code, running tests, and generating artifacts.
- Troubleshoot parallelism errors in Azure DevOps when running build pipelines.
While I couldn’t finish the pipeline due to the parallelism issue, I gained valuable insights into how CI/CD pipelines are set up and the importance of configuring them properly to ensure efficient software delivery. I plan to revisit the project after resolving the parallelism issues.
Credits: Azure Project Ideas