Sometimes you have multiple jobs with a Job pipeline, and you need to pass variables from the upstream jobs to the downstream jobs, how to do that?
Job Level
1. First, you need to install Environment Injector Plugin in your jenkins server.
2. In the job configuration page, there is a checkbox "Inject environment variables to the build process".
You can specify the Properties File Path and/or put any KEY/VALUE in the Properties Content.
3. Sometimes, variables is generated during the build process, then you need to add a step "Inject environment variables" in the build.
for example:
Node Level
You can also pass the variable between nodes level