-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Jenkins version 2.107.3
Influxdb-plugin version 1.15
I use influxdb-plugin in some jobs to publish custom data maps to an influxdb database.
With version 1.14, I used to do :
step([$class: 'InfluxDbPublisher', target: 'influx', customDataMap: [ myMeasurement: [ status: myStatus ] ] ])
But after upgrading to 1.15, this doesn't work anymore. I get the following logs in my console output:
[InfluxDB Plugin] Publishing data to: [url=******, description=influx, username=******, password=*****, database=myDb] [InfluxDB Plugin] Custom data map found. Writing to InfluxDB... [InfluxDB Plugin] Failed to collect data. Ignoring Exception:java.lang.NullPointerException [InfluxDB Plugin] Completed.
I need to explicitly pass an empty customDataMapTags in order to make it work :
step([$class: 'InfluxDbPublisher', target: 'influx', customDataMap: [ myMeasurement: [ status: myStatus ] ], customDataMapTags: [:] ])
Added a check to see if customdatamaps are null.