The problem occurs on
- Azure DevOps Service in a YML pipeline
- Using an on-prem private build agent
- And an on-prem SonarQube Server 8.1.0.31237
- The fault was introduced with the Azure DevOps ‘Prepare Analysis Configuration’ task 4.14.0
The Problem
When a build is run using the Azure DevOps ‘Prepare Analysis Configuration’ task 4.14.0 task a licensing error is reported
Starting: Prepare the SonarQube analysis
==============================================================================
Task : Prepare Analysis Configuration
Description : Prepare SonarQube analysis configuration
Version : 4.14.0
Author : sonarsource
Help : Version: 4.14.0. [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
==============================================================================
SYSTEMVSSCONNECTION exists true
E:\Agent\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.14.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe begin /k:BMISS
SonarScanner for MSBuild 5.0.2
Using the .NET Framework version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories...
12:14:33.282 Updating build integration targets...
12:14:33.411 12:14:33.411 WARNING: Failed to fetch license status from server.
##[error]12:14:33.412 Your SonarQube instance seems to have an invalid license. Please check it. Server url : https://sonarqube.<my domain>.co.uk/
12:14:33.412 Your SonarQube instance seems to have an invalid license. Please check it. Server url : https://sonarqube.<my domain>.co.uk/
##[error]12:14:33.412 Pre-processing failed. Exit code: 1
12:14:33.412 Pre-processing failed. Exit code: 1
##[error]The process 'E:\Agent\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.14.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe' failed with exit code 1
Finishing: Prepare the SonarQube analysis
Probable Cause
The failing Azure DevOps pipeline was working yesterday, we have made no changes.
On checking the Azure DevOps ‘Prepare Analysis Configuration’ task we see that yesterday when he task ran without error it was version 4.13.0. It was automatically updated to 4.14.0 overnight
I have check https://sonarqube..co.uk/api/editions/is_valid_license and it returns true so I do not think the server is at fault