Azure DevOps CI/CD 101 | Continuous Integration and Continuous Delivery

Kagan Kadioglu
adessoTurkey
Published in
4 min readJun 22, 2022

This article explains the basics of Azure DevOps and implements CI/CD pipelines.

Introduction

Using Azure DevOps doesn’t really imply that you may be following CI/CD.

Continuous Integration (CI) is a method of software development. Developers often integrate code into a shared repository, preferably many times each day. Each integration build should be verified by an automated build or automated tests. As an example, SonarQube integration will be mentioned later in the article.

For CI/CD, we usually follow the process outlined below.

Possible use cases

Consider Azure DevOps and CI/CD operations for:

· Accelerate application development and development lifecycles.

· Adding quality and consistency to the automated build and release process

· Increasing application stability and uptime.

Creating repository

For the simple microservice that can be created in the example, the code from the Github repo has been cloned into the Azure Repo. The Github repo can also be also used directly when creating the Pipeline without duplicating the Github repo.

Build pipeline

Create a pipeline

Create Pipeline
From Azure Repos Git

In this field, from which repository the code will be taken will be selected.

Azure DevOps repository
Run YAML file
The build has been started

Continuous Integration (CI)

SonarQube integration

SonarQube’s integration with Azure DevOps allows you to maintain code quality and security in your Azure DevOps repositories. It is compatible with both Azure DevOps Server and Azure DevOps Services.

  • Import your Azure DevOps repositories — Import your Azure DevOps repositories into SonarQube to easily set up SonarQube projects.
  • Analyze projects with Azure Pipelines — Integrate analysis into your build pipeline. Starting in Developer Edition, SonarScanners running in Azure Pipelines jobs can automatically detect branches or pull requests being built, so you don’t need to specifically pass them as parameters to the scanner.
  • Report your Quality Gate status to your pull requests — (starting in Developer Edition) See your Quality Gate and code metric results right in Azure DevOps so you know if it’s safe to merge your changes.

from “Browse marketplace” on Azure DevOps, search “SonarQube” and click “Get it free” button.

You can choose which collection it will be for and click the “Install” button.

Then SonarQube extesion will ready!

  • Secondly, we will generate a token for SonarQube.

SonarQube → Administrator → MyAccount → Security

SonarQube Administrator

We will name the token to be used for Azure DevOps and click “Generate” button. We will use this token for Azure Devops soon so make sure you save this token.

Generate token

After that, we need to configure Azure DevOps.

Service connection
Service connection SonarQube

SonarQube integration with Azure DevOps has been completed.

--

--