-
Improvement
-
Resolution: Done
-
Minor
-
None
-
-
1.23
Add the ability to use environment variables for the Custom Prefix and Custom Project Name. I'm trying to make a job that haves a parameter variable unique to a person using it, and I'd like that variable to be added as the prefix tag to the InfluxDB also, so the user can filter on their data in the database. This makes it more dynamic for having multiple users of the same Jenkins job.
See https://stackoverflow.com/questions/30512887/variable-substitution-in-jenkins-plugin for some details.
My thought is that adding the following lines to the beginning of InfluxDbPublisher.java:perform()
final EnvVars env = build.getEnvironment(listener);
String expandedCustomPrefix = env.expand(customPrefix);
String expandedCustomProjectName = env.expand(customProjectName);
Then use the new expanded variables for the rest of the function.I don't exactly know how to get the build and listener variables correct, but the link above should help.
Feature implemented. Will be available in next release.