Jenkins – How downstream job uses the git commit that is passed by upstream job

hudsonhudson-pluginsJenkins

I have two jobs(A and B) that I want to B is triggered by A with the git commit used by A after A is successfully built.

The build trigger plug-in supports trigger the downstream job with the git commit used in the upstream job.

My question is how the downstream job uses the passed in commit to check out. I didn't find which variable is passed by job A, and how to use the pass-in commit value to check out code in B via Git plug-in of Jenkins?

Best Answer

Jenkins Git plug-in is an intelligent tool. No specific configuration is needed. In upstream job trigger the downstream job with the Git commit used by the upstream job, downstream will automatically checkout the commit passed in by upstream.