Hello,
Does anybody know how to populate the "Environment Variables" section (found under the "Build Information" tab on the left) in the Splunk App for Jenkins? It's a scripted pipeline job. The "Build Summary" section (under the same "Build Information" tab) and "Logs and Artifacts" section are both populated.
I've reviewed the documentation on the Splunk Plugin for Jenkins page (https://wiki.jenkins.io/display/JENKINS/Splunk+Plugin+for+Jenkins) and the Splunk Plugin for Pipeline Job Support (https://wiki.jenkins.io/display/JENKINS/Splunk+Plugin+for+Pipeline+Job+Support) page but both are lacking in good documentation.
Thanks
Well this is a huge pain. Splunk "can't" help as the app isn't officially supported. We ended up solving this issue by calling the the splunkins.send() method. See the Customize Event Processing Script section in the Splunk Plugin for Jenkins page. It provides a very basic example of how to manually send data to Splunk. There are probably better ways to achieve the same goal.
In our project, the splunkins.send() method is called from a shared library within a Jenkinsfile. The repos to include inside the POM can be found at MVNRepository.com.
Links that didn't make it through:
Splunk Plugin for Jenkins - https://wiki.jenkins.io/display/JENKINS/Splunk+Plugin+for+Jenkins
MVNRepository.com - https://mvnrepository.com/artifact/com.splunk.splunkins