Reputation: 1879
I have create a new Pipeline "test". Under this Pipeline I have three jobs.
Job No#-
A- Build B- Test C- Publish
If I "Run" pipeline, all the three jobs get executed one after the other.
My Issue- How should I get Job A's Build No# as my Tag in Job C.(To track).
Error Logs--
> C:\Program Files (x86)\Git\bin\git.exe tag -l 9 # timeout=10
ERROR: Step ‘Git Publisher’ failed: Tag 9 already exists and Create Tag is specified, so failing.
Upvotes: 0
Views: 693
Reputation: 7880
You can use Parameterized Builds to accomplish that.
Basically, what you want to do is pass the build number of job A
from job A
down to job C
as a parameter, as described in the above schema :
To do that, you have to :
JOB_A_BUILD_NUMBER
from job A
to B
using "trigger parameterized build" in job A
.JOB_A_BUILD_NUMBER
from job B
to C
using "trigger parameterized build" in job B
.$JOB_A_BUILD_NUMBER
.To configure a parameterized job, you can just do that :
Upvotes: 1