In my Jenkins job, I have "Execute shell section" where I am declaring new variables and adding values to it say for e.g installdir=/work/homes/x".
Following this section i have a "Trigger call/build on other projects" section. I am calling another project and I want to send this installdir to it as a predefined parameter. I have turned on the "current build parameters" and "predefined parameters". In predefined paramters, i have given install_dir=$installdir.
But its not evaluating this. How can I make it evaluate this installdir variable.
FYI: I have to set this installdir to different path based on user input. So execute shell is the only place I can do this.
You should use the Parameterized Trigger Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin
UPDATE: See comments thread for info, the parametrized trigger plugin does not work for this particular use case.