Your Go-To Guide to Building CI/CD Pipeline In Azure DevOps
“Good software, like wine, takes time” – Avram Joel Spolsky
But do we have that much time?
The statement was perfect when SDLC still relied on the waterfall and agile methodologies. But the scenario has drastically changed since then. DevOps is ruling the SDLC world today, and tools supporting the process are everyone’s favorite. And CI/CD is the modern software development practice every DevOps engineer swears by. Azure DevOps is a reliable product that supports such processes and practices, which assists developers in creating CI/CD pipelines to consistently test and build the code. But designing Azure CI/CD pipelines is a struggle for many.
We are here with a basic guide to help you understand how to configure Azure CI CD pipelines and integrate them into Testsigma, a fully customizable test automation platform that covers all your testing needs!
Table Of Contents
- 1 What is a CI/CD Pipeline?
- 2 What is Azure DevOps?
- 3 How to build Azure CI/CD Pipeline?
- 4 Integrating Azure DevOps with Testsigma
- 5 Summary
- 6 Frequently Asked Questions (FAQs):
What is a CI/CD Pipeline?
CI/CD stands for continuous integration and continuous deployment, which refers to a series of steps developers perform to deliver a new software version or feature. The process is necessary for developers to go from creating the software consistently and productively or a new feature to deploying it to the production server automatically. No manual interference further saves time and improves error handling for the complete process.
Let’s talk about the various stages the CI/CD pipeline developers must go through for every new update.
Stages of a CI/CD Pipeline:
Source: The first stage of the CI/CD pipeline is the source stage. Within this step, an existing CI/CD pipeline will trigger when a code is changed in the repository. The tool that receives the notification of the code change runs the equivalent pipeline.
Failure to run and pass this stage shows potential configuration errors in the code and its dependencies.
Test: The third stage of the CI/CD pipeline is the test stage which executes automated tests to validate the accuracy and functioning of the software. The testing stage commonly consists of running test cases such as smoke, unit, and integration.
Deploy: The fourth and last stage is the deploy stage, which focuses on the automated pushing of the code to the live server. Once the software version passes the tests, developers deploy the final version on the production and live environment for the users.
What is Azure DevOps?
A Microsoft product, Azure DevOps packages several development services for a team to plan, build, collaborate, deliver, deploy, and support the software. It offers browser integration features or an Integrated Development Environment (IDE).
Following are the Azure DevOps services for developers:
- Azure Repos
- Azure Pipelines
- Azure Boards
- Azure Test Plans
- Azure Artifacts
We will talk about these features in detail in the later sections.
Predominantly, we will focus on how to create an Azure CI/CD pipeline and integrate the same into the Testsigma.
What are Azure Pipelines?
Azure pipeline handles and simplifies the CI/CD process for developers. You can begin Azure CI CD pipeline implementation from the source stage by using the code available on GitHub or the on-premises containers. Thereafter, you can move forward with the rest of the steps discussed above.
Azure Repose stands for Azure repository and maintains a central repository for your code. Azure Pipelines maintain the build and releases pipelines for the given project. Besides handling CI/CD with Azure DevOps, Azure Pipelines also emerge useful in creating build-deploy-test workflows to perform continuous testing (CT).
Advantages of Azure Pipelines
Azure Pipelines offers a quick and easy way of automating the software development process, which provides consistent deployment and quality code for the users. Some of the well-known advantages of Azure Pipelines are:
- It is compatible with any language and platform, including cloud
- The service easily integrates with Azure deployments and GitHub
- You can use it to execute builds on Windows, Linux, and macOS
- It works well with open-source applications
- Azure Pipeline allows you to deploy code on multiple targets, such as container registries and virtual machines
Azure DevOps Features
As already discussed above, Azure DevOps is a collection of services that are useful to developers to execute CI/CD practices. Here we provide an explanation of the different features of Azure DevOps:
It is a version control tool that allows you to manage the code and track the changes made in the same. Azure Repos provides two types of version control—Git repositories and Team Foundation Version Control (TFVC)—for source control of your code.
It provides build and release services to support CI/CD processes to automatically build, test, and deliver your code to any environment. Azure Pipelines is compatible with all the major languages and project types.
It is a software management service consisting of Agile tools to track and manage application development and testing progress. Azure Boards provides a rich set of capabilities, including native support for Scrum and Kanban processes, calendar views, configurable dashboards, and integrated reporting to monitor the overall CI/CD workflow.
Azure Test Plans
It is a set of tools that enable team members to collaborate and drive quality through complete application development. Azure Test Plans is an easy-to-use, browser-based test management solution that supports planned manual testing, user acceptance testing, exploratory testing, and collecting feedback from stakeholders.
It allows teams to share packages such as Maven, npm, NuGet, and more from public and private sources. Artifacts feeds bring together different types of packages into your pipelines.
You can further use Azure Artifacts with Azure Pipelines to deploy packages, publish build artifacts, and integrate files between pipeline stages.
How to build Azure CI/CD Pipeline?
Azure DevOps is a reliable platform for creating CI/CD pipelines using its Azure Pipeline service. The package supports different languages and programs through which you can build the pipeline to perform CI/CD for your application development.
This article will briefly provide a brief on how to create CI/CD pipeline for .Net and GitHub repo using Azure DevOps. Both of these methods have some similar pre-requisites, but they differ in configuration at the later stage.
Create a CI/CD pipeline for the GitHub repo using Azure DevOps Starter
Azure DevOps simplifies the CI/CD pipeline creation process, and under this section, we will discuss how to do this for the GitHub repo.
To start with the process, you will require a couple of setups before creating the pipeline. The pre-requisites are:
- An Azure subscription
- Access to GitHub or external Git repo to access the existing code or write a new one in any language preferable
Here are the steps to follow:
- Sign in to Azure Portal and search for DevOps Starter. Then click on Add to create a new resource.
- Select Bring Your Own Code and then Next.
Configuration and Framework Selection:
- Select GitHub or external Git repo. Here, we will move ahead with the GitHub option. You will also need to authenticate GitHub to allow Azure access to the repository.
- After selecting the repository and the Branch, click on Next.
- For Docker containers, make sure to select Yes for Is app Dockerized. We are moving ahead with the No option for this tutorial. Click on Next.
- Next, you will need to select a runtime application and framework.
- Finally, select an Azure service to deploy your application and move forward.
Your next steps are as follows, which are explained in detail here for better understanding.
- Configure Azure DevOps with Azure Subscription under a Project (you have to create a new project). You can access this project through the dashboard that shows your code repo, the CI/CD pipeline, and the app in Azure.
- You are ready to commit changes to your GitHub code and deploy it on Azure. Follow the institutions given in the above link.
- The next step is to examine your CI/CD pipeline in Azure Pipelines, which gives you access to the build history, code change triggers, and build edit rights.
Create CI/CD Pipelines for ASP.Net using Azure DevOps Starter
The next option is to create an Azure CI/CD pipeline for ASP.Net. And similar to the above process, you require some initial setups before creating the pipeline. The pre-requisites are:
- An Azure subscription, which you can avail of for free through Visual Studio Dev Essentials
- Knowledge of ASP.Net
Here are the steps to follow:
- Sign in to Azure Portal and search for DevOps Starter. Then click on Add to create a new resource.
- Select a .Net sample application, which will include a choice of either the open-source ASP.NET framework or the cross-platform ASP.NET Core framework. Here we will continue with the .NET Core application framework.
- Select the platform to deploy your application and click Next. We will go with Windows Web App as a deployment target.
Your next steps are similar to how they were for CI/CD pipeline using GitHub, which are described in this document by Microsoft in detail:
- Configure Azure DevOps with Azure Subscription under a Project (you have to create a new project).
- You are ready to commit code changes and deploy them on Azure. Follow the institutions given in the above link.
- The next step is to examine your CI/CD pipeline to explore and personalize the pipeline as per your need.
Integrating Azure DevOps with Testsigma
By now, you know how to create CI/CD pipelines in Azure DevOps. But this knowledge is useful when you know how to use it correctly. In this section, we will continue our discussion about Azure DevOps integration with Testsigma for performing real-time browser testing. It proves to be extremely helpful in bug tracking from Testsigma and listing it on the Azure DevOps CI/CD Dashboard of the Project.
For the uninitiated, Testsigma is an open-source cloud-based codeless test automation tool. It supports end-to-end testing for web, mobile apps, & APIs with scripts that are self-healing.
Steps to integrate Azure DevOps with Testsigma:
Azure DevOps Organization URL: You would need the Azure DevOps URL which is the domain name. You can find the URL by logging into your Azure DevOps account under your organization.
Personal Access Token (PAT): You would also need PAT. You will find that under the Azure Application, you can find the Personal Access Token under Security > Personal Access Tokens.
Once these prerequisites are taken care of, you can go ahead with Azure DevOps integration with Testsigma. Follow these steps:
1. The process starts after you acquire the URL and PAT. And because Azure DevOps comes as a third-party plug-in. All you need to do is add that plug-in.
Navigate to the Plugins page through Dashboard > Settings > Plugins and select Azure DevOps which is present under the Product Management tab.
2. Then, click on the Disabled Icon on Azure DevOps Boards. After, you will see the below prompt:
3. Enter the details that you got in the prerequisites section and click on Create to complete the integration process.
Report Bug Using Azure DevOps Board while Testing on Testsigma
Now that you know how to integrate Azure DevOps with Testsigma, let’s talk about the simple step you need to report the bug while testing on Testsigma.
Go to the Test Run results page and click on the Report Bug icon.
It will open the below overlay:
Enter the details as per your requirement and give the description that mentions your bugs:
- Project: Name of your Azure Project.
- Issue Type: Type of the Issue – Bug, Task, etc.
- Title: Title of the Item to be created in Azure DevOps Board.
- Description: Add a meaningful description for the item with as much detail as you can provide.
There is a clear indication of CI/CD popularity among DevOps engineers. They are always on the lookout for tools that offer improved CI/CD pipeline creation and easy integration options. Azure DevOps is the one tool that packages every necessary to build, test, and deploy an application for faster delivery. It also supports integration with Testsigma, which is extremely useful in bug tracking.
We have discussed the complete process of integrating Azure DevOps with Testsigma. You can go through this blog or follow our docs section to better understand the integration process.
Frequently Asked Questions (FAQs):
What is the AWS CI/CD pipeline?
AWS CI/CD pipeline builds, tests, and deploys a product or application in an AWS environment. AWS offers a complete set of CI/CD developer tools to accelerate software development and release cycles. One is AWS CodePipeline, which automates the build, test, and deploy phases for every change in the code.
Is Azure DevOps a CI/CD tool?
No, Azure DevOps is not a CI/CD tool. It is a set of several development services for a team to plan, build, collaborate, deliver, deploy, and support the software. One of the services within Azure DevOps supports creating CI/CD pipelines, which is discussed in detail in this blog.
Does Azure DevOps need Jenkins?
Azure DevOps does not need Jenkins, but you can use both of them together. You can trigger Jenkins build when the Azure DevOps Services build is complete to use both systems to build the app.
Is coding required for Azure DevOps?
Yes, you do require a certain level of coding and scripting language knowledge for configuring and using Azure DevOps.