-
Improvement
-
Resolution: Fixed
-
Minor
-
None
-
-
2.0
Jenkins: 2.73.2.1-rolling
InfluxDB plugin: 1.12.3
Jenkins pipeline implementation.
I am attempting to publish sonarqube results with the influxdb plugin, but I get the following error:
[InfluxDB Plugin] Publishing data to: [url=http://influx.example.com, description=influxdb, username=jenkins, password=*****, database=jenkins]
[InfluxDB Plugin] SonarQube data found. Writing to InfluxDB...
[InfluxDB Plugin] Failed to collect data. Ignoring Exception:java.lang.RuntimeException: Failed : HTTP error code : 401
[InfluxDB Plugin] Completed.
This is because our sonarqube installation requires authentication. I have wrapped the step([$class: 'InfluxDbPublisher']), inside a withSonarQubeEnv block, which exposes a number of new environment variables, including SONAR_HOST_URL and SONAR_AUTH_TOKEN.
It would be great if the influxdb plugin could utilize the exposed ENV variables to authenticate with Sonarqube (if available)
Improvement implemented and will be available in the next release.