Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adding custom data to InfluxDB from pipelines & fixing issue with customPrefix #7

Merged
merged 3 commits into from
Oct 18, 2016

Conversation

nocono
Copy link
Contributor

@nocono nocono commented Oct 10, 2016

This pull request is intended to add some flexibility to the plugin.

Data within pipelines can be simply created.
With the CustomDataPointGenerator this can easily be written into Influx as "jenkins_custom_data"
In a pipeline script data is passed as Map to customData as follows:

def myDataMap = [:]
myDataMap['myFirstKey'] = 'myValue'
myDataMap['mySecondKey'] = 1234
step([$class: 'InfluxDbPublisher', target: myTarget, customPrefix: 'myPrefix', customData:myDataMap])

The second part of the pull request is to fix an issue with customPrefix. Without @DataBoundSetter the customPrefix is not taken into consideration from a pipeline script.

nocono and others added 3 commits October 7, 2016 20:31
This can be used inside a pipeline script to pass any custom data to InfluxDB
setting custom prefix like
`step([$class: 'InfluxDbPublisher', selectedTarget: myTarget, customPrefix: 'Org_Space'])`
did not work.
Adding @DataBoundSetter fixes this problem.
@asimell asimell merged commit f2ae46e into jenkinsci:master Oct 18, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants