-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
-
Jenkins 2.235.5
xunit-plugin 2.3.9
Cannot get Jenkins environment variables from Custom stylesheets when using Custom tool configuration
Since XLST 3.0 there are two functions to get environment variables within a stylesheet
(available-environment-variables and environment-variable)
I can access to the regular system environment variables but no the environment variables set by Jenkins such as JENKINS_URL, JOB_URL, BUILD_NUMBER, ....
I've tested with Freestyle jobs and pipeline jobs in Windows and Linux with the same results.
An example with pipeline:
pipeline { agent any stages { stage('Build') { steps { xunit([Custom(customXSL: 'transform.xslt', deleteOutputFiles: false, failIfNotNew: false, pattern: 'aresult.xml', skipNoTestFiles: false, stopProcessingIfError: false)]) } } } }
Check the xml file generated in generatedJUnitFiles/ folder. It doesn't list the Jenkins environment variables