Introducing Qodana for Azure Pipelines
Tags: news, plugins, azure, azuredevops
Published: 2022-04-11 07:10:20

---
title: Introducing Qodana for Azure Pipelines
published: true
date: 2022-04-07 11:26:11 UTC
tags: news,plugins,azure,azuredevops
canonical_url: https://blog.jetbrains.com/qodana/2022/04/introducing-qodana-for-azure-pipelines/
---

With Qodana, you can detect, analyze, and resolve code issues right in the CI/CD system you rely on. Since Qodana was released, we’ve supported [GitHub Actions](https://www.jetbrains.com/help/qodana/github-actions.html), [GitHub App](https://www.jetbrains.com/help/qodana/qodana-github-application.html), [GitLab CI/CD](https://www.jetbrains.com/help/qodana/gitlab.html), [TeamCity](https://www.jetbrains.com/help/qodana/qodana-teamcity-plugin.html), and [Jenkins](https://www.jetbrains.com/help/qodana/jenkins.html). We continue to expand our integrated environments to make sure we bring code quality into your favorite CI/CD. This time around, we’re introducing a new extension for [Azure Pipelines](https://marketplace.visualstudio.com/items?itemName=JetBrains.qodana).

![](https://blog.jetbrains.com/wp-content/uploads/2022/04/featured_image.png)

[Try for free](https://marketplace.visualstudio.com/items?itemName=JetBrains.qodana "Try for free")

Qodana linters are now integrated into your Azure DevOps repositories to allow you to make code analysis a part of your build pipeline and ensure the maintainability and reliability of your projects. You can integrate Qodana with Azure Pipelines in just 2 steps:

- [Install Qodana for Azure Pipelines](#install-qodana)
- [Configure Qodana to analyze your code](#configure-qodana)

Now let’s dive into the details.

## Install Qodana for Azure Pipelines

From Visual Studio Marketplace, install the [Qodana for Azure Pipelines](https://marketplace.visualstudio.com/items?itemName=JetBrains.qodana) extension by clicking the _Get it free_ button, and _Proceed to organization_ once the installation has finished.

If you do not have the required permissions to install an extension from the marketplace, a request will be sent to the account administrator to ask them to approve the installation.

## Configure Qodana to analyze your code

### Set up a pipeline that integrates with Qodana

Before analyzing your code, you will first need to set up a new build pipeline that integrates with Qodana. On the Azure DevOps panel, go to _Pipelines_ and click _Create Pipeline_. If any pipelines have already been created, select _New pipeline_.

![](https://blog.jetbrains.com/wp-content/uploads/2022/04/screen1.png)

You can configure the pipeline with either the YAML editor or the classic editor. When using the classic editor, you can take advantage of the predefined templates. The YAML editor requires you to use a YAML file. Let’s choose the latter for this example.

![](https://blog.jetbrains.com/wp-content/uploads/2022/04/screen2.png)

The YAML editor will open with the template YAML file. In order to configure it correctly you will need to configure the [_Qodana Scan_](https://github.com/JetBrains/Qodana/blob/2021.3/topics/qodana-azure-pipelines.md) task by editing your azure-pipelines.yml file:

```
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
  - main

pool:
  vmImage: ubuntu-latest

steps:
  - task: Cache@2 # Not required, but Qodana will open projects with cache faster.
    inputs:
      key: '"$(Build.Repository.Name)" | "$(Build.SourceBranchName)" | "$(Build.SourceVersion)"'
      path: '$(Agent.TempDirectory)/qodana/cache'
      restoreKeys: |
        "$(Build.Repository.Name)" | "$(Build.SourceBranchName)"
        "$(Build.Repository.Name)"
  - task: QodanaScan@1
```

You can also find the _Qodana Scan_ task in the list of tasks on the _Show assistant_ panel.

![](https://blog.jetbrains.com/wp-content/uploads/2022/04/screen3.png)

### ​​Run your pipeline

When you are done making the changes to the file, click _Save and Run_.

![](https://blog.jetbrains.com/wp-content/uploads/2022/04/screen4-1.png)

### See the results

To display the Qodana report summary in Azure DevOps, install [Microsoft DevLabs’ SARIF SAST Scans Tab](https://marketplace.visualstudio.com/items?itemName=sariftools.scans) extension. Once installation is done, go to the _Pipelines_ tab, select the pipeline being run and analyzed, and look at the _Scans_ tab for more information about the quality of your code.

![](https://blog.jetbrains.com/wp-content/uploads/2022/04/screen5.png)

With the Qodana for Azure Pipelines extension, you will be able to easily integrate Qodana into your Azure DevOps pipeline and start seeing the analytics the first time your code is checked.

If you have any questions or suggestions about Qodana, post a comment here, tag us on [Twitter](https://twitter.com/Qodana) or contact us at qodana-support@jetbrains.com.

_Your Qodana team_