I have TFS 2017 with a build definition that executes successfully. I have a SonarQube server 7.9.1 and I also installed the latest TFS SonarQube extensions, so that now I have available the “Prepare analysis on SonarQube” , “Run Code Analysis” and “Publish Quality Gate Results” tasks.
I added “Prepare analysis…” and “Run Code Analysis” tasks to my build definition and configured the tasks successfully, also I defined a SonarQube Server EndPoint.
First I had an error saying that the build agent didn’t have the java capability; so I defined a system variable over the build agent server called “java” with a value of “C:\jdk-11.0.2\bin” (openJDK 11); and then I restarted the Agent; and then when I review the capabilities of the agent over TFS , it does show the java capability; so that now I don’t get the error of not having an agent with the java capability.
Now, when I have the SonarQube tasks enabled and submit a build request, I get: “Waiting for an enabled agent. All possible agents are disabled.” and remains like this forever, until I cancel the request.
But if I disable the SonarQube tasks, then the build executes successful.
does anyone know about this? have you seen this before?
Note: through TFS the agent appears online all the time and it is; but yet when enabling the SonarQube task as part of the build definition, I keep getting the message mentioned above of "Waiting for an enabled agent. All possible agents are disabled."