** Before you start, make sure you have Parameterized Trigger Plugin installed (https://plugins.jenkins.io/parameterized-trigger/)
- Create a downstream parameterized project:
2. Use a build step, I am using a simple shell
3. Run the downstream job:
4. Now Create an upstream parameterized project:
5. Under the “Build Steps”, select “Trigger/call builds on other projects”
6. Enter the downstream project name and specify block option as per your requirement:
7. Cick on “Add Parameters” and select “Predefined parameters”
8. Specify your parameters and save the configuration:
9. Build the upstream project:
10. Check the build logs and go to the downstream project build reported in the log:
NOTES:
- Make sure variables are declared in downstream project to hold the value passed through upstream project. Reported Issue: https://stackoverflow.com/questions/48507412/trigger-parameterized-build-on-other-projects-does-not-pass-parameter/50977116#50977116
- You can also pass build environment secret texts and files and make it work you need to declare a variable in downstream project as I mentioned earlier.