output
+ SVN_REVISION_NUM=47337 :
+ echo 47337 47337 + export SVN_REVISION=47337 + SVN_REVISION=47337
In Post-build Actions section
we have Trigger parameterized build on other projects, and predefined parameter set to SVN_REVISION=${SVN_REVISION_NUM}
But in Job B console, it dosent see the revision number and Job B's SCM could retrieve the revision numberLocation 'https://jobBhost.com/svn/src@${SVN_REVISION_NUM}' does not existWhat did we do wrong ?Thanks
I ran into this very same problem.
It appears (at least with my experience) the only variables passed from Job A -> Job B are the variables predefined by Jenkins.
To work around the issue, in my build shell for Job A, I wrote the variable=value into a file and used the “Parameters from properties file” Parameter in the “Trigger parameterized build on other projects” when running Job B.
Jason
We also ended up generally saving all metadata (system/environment variables, jenkins parameters, and build properties etc) into properties file and archieve them. This approach simplifies/works around many problems we had. Now every build has its metadata archived, for downstream jobs or later references, we can get all necessary information from this one file, no extra parameters needed to be pass around. Furthermore, if anything went wrong, the metadata is very helpful for the investigation. I would also recommend this simple strategy.