{"id":5443,"date":"2023-06-08T07:00:34","date_gmt":"2023-06-08T07:00:34","guid":{"rendered":"https:\/\/qualitapps.com\/?p=5443"},"modified":"2023-11-20T06:04:59","modified_gmt":"2023-11-20T06:04:59","slug":"how-to-integrate-sonarqube-with-azure-devops","status":"publish","type":"post","link":"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/","title":{"rendered":"Integration of SonarQube with Azure DevOps"},"content":{"rendered":"
\"Integration<\/div><\/div>
<\/div>

Integrating SonarQube with Azure DevOps allows you to perform static code analysis to detect quality issues and vulnerabilities in your projects. Follow these steps to configure the integration:<\/p>\n<\/div><\/div>

<\/div>

Step 1: SonarQube Configuration<\/span><\/span><\/h2>
    \n
  1. SonarQube Installation: Download and install SonarQube on your server or in a cloud environment following the official SonarQube documentation.<\/li>\n
  2. Project Configuration in SonarQube: Create a project in SonarQube for the repository you want to analyze. Generate an access token in SonarQube for this project.<\/li>\n<\/ol>\n<\/div><\/div>
    <\/div>

    Step 2: Azure DevOps Configuration<\/span><\/span><\/h2>
      \n
    1. Pipeline Creation: Access Azure DevOps and navigate to the project you want to integrate with SonarQube. Create a new pipeline or modify an existing one.<\/li>\n
    2. Pipeline Configuration: Inside the pipeline definition file (usually named azure-pipelines.yml), add or modify the steps section to include a SonarQube analysis step. Here is an example of how it might look:\n
      <\/div>\n
      steps:\r\n- task: SonarSource.sonarcloud.**cli**.sonarcloudbegin@1\r\n  inputs:\r\n    sonarCloud: 'SonarQubeConnection'\r\n    organization: 'SonarQubeOrganization'\r\n    projectKey: 'SonarQubeProjectKey'\r\n    projectName: 'SonarQubeProjectName'\r\n    scannerMode: 'CLI'\r\n    configMode: 'manual'\r\n    cliProjectKey: 'SonarQubeProjectKey'\r\n    cliSources: 'src'\r\n    cliTests: 'tests'\r\n    extraProperties: |\r\n      sonar.exclusions=**\/*.xml,**\/*.json,**\/*.md\r\n      sonar.coverage.exclusions=**\/*.xml,**\/*.json,**\/*.md\r\n- task: **YourBuildTask**\r\n  # Configura tus pasos de compilaci\u00f3n, pruebas y despliegue\r\n- task: SonarSource.sonarcloud.**cli**.sonarcloudend@1\r\n  inputs:\r\n    sonarCloud: 'SonarQubeConnection'\r\n    organization: 'SonarQubeOrganization'\r\n<\/pre>\n

      Make sure to replace the values of SonarQubeConnection, SonarQubeOrganization, SonarQubeProjectKey<\/strong>, and SonarQubeProjectName<\/strong> with the ones corresponding to your SonarQube configuration.<\/li>\n

    3. Save and Run the Pipeline: Save the changes to the pipeline definition file and execute the pipeline to start the SonarQube analysis.<\/li>\n<\/ol>\n<\/div><\/div>
      <\/div>

      Step 3: Viewing Results<\/span><\/span><\/h2>

      Once the pipeline execution is completed, the SonarQube analysis results will be available in the Azure DevOps dashboard. You can access them to identify quality issues, vulnerabilities, and other code-related metrics in your project.<\/p>\n<\/div><\/div>

      <\/div>

      And that’s it! You have successfully integrated SonarQube with Azure DevOps. Now you can leverage SonarQube’s static code analysis capabilities to improve the quality of your projects in Azure DevOps.<\/span><\/em><\/p>\n<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"Integrating SonarQube with Azure DevOps allows you to perform static code analysis to detect quality issues and vulnerabilities in your projects. Follow these steps to configure the integration: Step 1: SonarQube Configuration SonarQube Installation: Download and install SonarQube on your server or in a cloud environment following the official SonarQube documentation. Project Configuration in SonarQube:...","protected":false},"author":1,"featured_media":4824,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[107],"tags":[313,714,712,715,711,713,716],"class_list":["post-5443","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops-en","tag-azure-devops-en","tag-code-quality","tag-integration","tag-pipeline-en","tag-sonarqube-en","tag-static-code-analysis","tag-tutorial-en"],"acf":[],"yoast_head":"\nHow to integrate SonarQube with Azure DevOps?<\/title>\n<meta name=\"description\" content=\"Learn how to integrate SonarQube with Azure DevOps for static code analysis and project quality improvement. Follow our step-by-step guide now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Integration of SonarQube with Azure DevOps\" \/>\n<meta property=\"og:description\" content=\"Learn how to integrate SonarQube with Azure DevOps for static code analysis and project quality improvement. Follow our step-by-step guide now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/\" \/>\n<meta property=\"og:site_name\" content=\"QualitApps\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-08T07:00:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-20T06:04:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/qualitapps.com\/wp-content\/uploads\/2023\/05\/405.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1049\" \/>\n\t<meta property=\"og:image:height\" content=\"486\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/qualitapps.com\/en\/#\/schema\/person\/da020797acdf92946fe98f94977a0b34\"},\"headline\":\"Integration of SonarQube with Azure DevOps\",\"datePublished\":\"2023-06-08T07:00:34+00:00\",\"dateModified\":\"2023-11-20T06:04:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/\"},\"wordCount\":404,\"publisher\":{\"@id\":\"https:\/\/qualitapps.com\/en\/#organization\"},\"keywords\":[\"Azure DevOps\",\"code quality\",\"integration\",\"pipeline\",\"SonarQube\",\"static code analysis\",\"tutorial\"],\"articleSection\":[\"DevOps\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/\",\"url\":\"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/\",\"name\":\"How to integrate SonarQube with Azure DevOps?\",\"isPartOf\":{\"@id\":\"https:\/\/qualitapps.com\/en\/#website\"},\"datePublished\":\"2023-06-08T07:00:34+00:00\",\"dateModified\":\"2023-11-20T06:04:59+00:00\",\"description\":\"Learn how to integrate SonarQube with Azure DevOps for static code analysis and project quality improvement. Follow our step-by-step guide now!\",\"breadcrumb\":{\"@id\":\"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/qualitapps.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Integration of SonarQube with Azure DevOps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/qualitapps.com\/en\/#website\",\"url\":\"https:\/\/qualitapps.com\/en\/\",\"name\":\"Qualitapps\",\"description\":\"Expertos en Desarrollo de Software y Outsourcing\",\"publisher\":{\"@id\":\"https:\/\/qualitapps.com\/en\/#organization\"},\"alternateName\":\"Qualitapps\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/qualitapps.com\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/qualitapps.com\/en\/#organization\",\"name\":\"Qualitapps\",\"alternateName\":\"Qualitapps\",\"url\":\"https:\/\/qualitapps.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/qualitapps.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/qualitapps.com\/wp-content\/uploads\/2022\/11\/qualitapps-logo-whitebg.jpg\",\"contentUrl\":\"https:\/\/qualitapps.com\/wp-content\/uploads\/2022\/11\/qualitapps-logo-whitebg.jpg\",\"width\":300,\"height\":300,\"caption\":\"Qualitapps\"},\"image\":{\"@id\":\"https:\/\/qualitapps.com\/en\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/qualitapps.com\/en\/#\/schema\/person\/da020797acdf92946fe98f94977a0b34\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/qualitapps.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b6896e0154f71f1f40dfa4981388e633?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b6896e0154f71f1f40dfa4981388e633?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/qualitapps.com\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to integrate SonarQube with Azure DevOps?","description":"Learn how to integrate SonarQube with Azure DevOps for static code analysis and project quality improvement. Follow our step-by-step guide now!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/","og_locale":"en_US","og_type":"article","og_title":"Integration of SonarQube with Azure DevOps","og_description":"Learn how to integrate SonarQube with Azure DevOps for static code analysis and project quality improvement. Follow our step-by-step guide now!","og_url":"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/","og_site_name":"QualitApps","article_published_time":"2023-06-08T07:00:34+00:00","article_modified_time":"2023-11-20T06:04:59+00:00","og_image":[{"width":1049,"height":486,"url":"https:\/\/qualitapps.com\/wp-content\/uploads\/2023\/05\/405.png","type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/#article","isPartOf":{"@id":"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/"},"author":{"name":"admin","@id":"https:\/\/qualitapps.com\/en\/#\/schema\/person\/da020797acdf92946fe98f94977a0b34"},"headline":"Integration of SonarQube with Azure DevOps","datePublished":"2023-06-08T07:00:34+00:00","dateModified":"2023-11-20T06:04:59+00:00","mainEntityOfPage":{"@id":"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/"},"wordCount":404,"publisher":{"@id":"https:\/\/qualitapps.com\/en\/#organization"},"keywords":["Azure DevOps","code quality","integration","pipeline","SonarQube","static code analysis","tutorial"],"articleSection":["DevOps"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/","url":"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/","name":"How to integrate SonarQube with Azure DevOps?","isPartOf":{"@id":"https:\/\/qualitapps.com\/en\/#website"},"datePublished":"2023-06-08T07:00:34+00:00","dateModified":"2023-11-20T06:04:59+00:00","description":"Learn how to integrate SonarQube with Azure DevOps for static code analysis and project quality improvement. Follow our step-by-step guide now!","breadcrumb":{"@id":"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/qualitapps.com\/en\/how-to-integrate-sonarqube-with-azure-devops\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/qualitapps.com\/en\/"},{"@type":"ListItem","position":2,"name":"Integration of SonarQube with Azure DevOps"}]},{"@type":"WebSite","@id":"https:\/\/qualitapps.com\/en\/#website","url":"https:\/\/qualitapps.com\/en\/","name":"Qualitapps","description":"Expertos en Desarrollo de Software y Outsourcing","publisher":{"@id":"https:\/\/qualitapps.com\/en\/#organization"},"alternateName":"Qualitapps","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/qualitapps.com\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/qualitapps.com\/en\/#organization","name":"Qualitapps","alternateName":"Qualitapps","url":"https:\/\/qualitapps.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/qualitapps.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/qualitapps.com\/wp-content\/uploads\/2022\/11\/qualitapps-logo-whitebg.jpg","contentUrl":"https:\/\/qualitapps.com\/wp-content\/uploads\/2022\/11\/qualitapps-logo-whitebg.jpg","width":300,"height":300,"caption":"Qualitapps"},"image":{"@id":"https:\/\/qualitapps.com\/en\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/qualitapps.com\/en\/#\/schema\/person\/da020797acdf92946fe98f94977a0b34","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/qualitapps.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b6896e0154f71f1f40dfa4981388e633?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b6896e0154f71f1f40dfa4981388e633?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/qualitapps.com"]}]}},"_links":{"self":[{"href":"https:\/\/qualitapps.com\/en\/wp-json\/wp\/v2\/posts\/5443","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qualitapps.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qualitapps.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qualitapps.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qualitapps.com\/en\/wp-json\/wp\/v2\/comments?post=5443"}],"version-history":[{"count":5,"href":"https:\/\/qualitapps.com\/en\/wp-json\/wp\/v2\/posts\/5443\/revisions"}],"predecessor-version":[{"id":10367,"href":"https:\/\/qualitapps.com\/en\/wp-json\/wp\/v2\/posts\/5443\/revisions\/10367"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qualitapps.com\/en\/wp-json\/wp\/v2\/media\/4824"}],"wp:attachment":[{"href":"https:\/\/qualitapps.com\/en\/wp-json\/wp\/v2\/media?parent=5443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qualitapps.com\/en\/wp-json\/wp\/v2\/categories?post=5443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qualitapps.com\/en\/wp-json\/wp\/v2\/tags?post=5443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}