-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
The Parameterized Build plugin give people access to the following environment variables:
- - LAST_TRIGGERED_JOB_NAME="Last project started"
- - TRIGGERED_BUILD_NUMBER_<project name>="Last build number triggered"
- - TRIGGERED_JOB_NAMES="Comma separated list of all triggered projects"
- - TRIGGERED_BUILD_NUMBERS_<project name>="Comma separated list of build numbers triggered"
- - TRIGGERED_BUILD_RESULT_<project name>="Last triggered build result of project"
- - TRIGGERED_BUILD_RESULT_<project name>RUN<build number>="Result of triggered build for build number"
- - TRIGGERED_BUILD_RUN_COUNT_project name>="Number of builds triggered for the project"
It would be good if the Remote Parameterised Plugin could give people access to at least:
- - TRIGGERED_BUILD_NUMBER_<project name>="Last build number triggered"
As we are trying to download artifacts using the lastSuccessul link, and this is failing when another job is kicked off on the remote job.
I have a POC working if you'd like the code - needs Unit Tests though (has only been bench tested).
I have added this functionality to the following branch:
https://github.com/timbrown5/parameterized-remote-trigger-plugin/tree/JENKINS-22384-Add-EnvVars
We are using this locally, please let me know if you'd like me to submit a pull request.
Note: This branch also has a workaround for some local networking issues we are having. We are finding that sometimes a connection drops and this makes the plugin drop out too early. To workaround this I have added a connectionRetry section to sendHTTPCall (in the catch IOException) that retries the call x amount of times before failing - suing recursion. This is hard coded to 5, but could be available to be configured via jelly input (although we've only ever seen it retry once at a time).