I have one pipeline job where it executes multiple jobs say job1 and job2. Once the execution is complete, i need to get the job2's build url and its build number and put that in the post section of success.
How to achieve this? Pls share your inputs.
Stages
{
Stage A
{
build 'job1'
}
stage B
{
build 'job2'
}
}
post
{
success
{
mail to: "${EMAIL_LIST}",
subject: 'Test Pipeline - SUCCESS',
body: " Get job-2's build_url and build_number"
}
}