I have a pipeline that builds one or multiple downstream jobs, but I just want that only build once the downstream job.
The main reason is that some jobs are triggered based on multiple conditions, and if one of the conditions match, I'll trigger that job a few times. Could we set a limit per downstream job? or at least set a flag that I can check before trigger another duplicate job?
The current job build that I use is the following:
build(job: job, parameters: jobparams, wait: false)
Is there any variable that I can access to know the downstream jobs trigger by the current job?