Harness issue with harness/sonarqube-agent-job-runner (Latest and previous versions)

Up until approx 2 weeks ago the team where using the harness image on docker hub to publish the results, Image Layer Details - harness/sonarqube-agent-job-runner:latest.

There seems to have been a change in the last two weeks as all build are now failing with the error Request failed: HTTP 400 - {‘errors’: [{‘msg’: “The ‘organization’ parameter is required when using an organization token”}]}.

My assumption although this may be wrong is the switch to API version 2 but we can’t find any way to inject the organization at runtime to allow this upload to occur.

Hi,

Welcome to the community!

It sounds like you inadvertently(?) upgraded your scanner to a current version. The default sonar.host.url used to be http://localhost:9000 but a couple years ago(? I lose track) we switched it to https://sonarcloud.io, and that’s a SonarQube Cloud error you’re getting. Double-check your analysis parameters and make sure you’re passing in the right sonar.host.url value.

 
HTH,
Ann