Executing upstream job called \"A\". On success of A executing test cases which is downstream project \"B\". But while sending mail from B we have to incorporate upstream pr
You can pass in the upstream variables via build parameters to the downstream job and then you can access them (in the downstream job) using things such as ${MyParameter1} and ${MyParameter2}.
You would need to:
ParentJobName=${JOB_NAME}You should be able to pass in the basic stuff that way. Anything more complicated than that and you will probably be better off using a plugin like Copy Artifacts Plugin to copy files or using the Jenkins API in a system groovy step to get/modify the upstream build, etc.