Trigger (and track) a build promotion from an unrelated job (using Groovy script)

10 views
Skip to first unread message

Dirk Heinrichs

unread,
Nov 19, 2021, 9:07:37 AM11/19/21
to jenkins...@googlegroups.com
Hi,

given 2 (non-pipeline) jobs, A and B, where B needs to automatically update the version of A's built software on a branch which is then consumed by job C. In order to do this, B would need to
  1. Check whether A's latest successful build has also been successfully promoted (say by promotion X)
  2. If not: Run A's promotion X and wait for it to finish successfully. Fail the build if the promotion fails
  3. Get the archived results of the promoted build, update a branch in the repository used by C with A's new version and push the change to trigger a build of C

The problem I have is in step 2. I can trigger the promotion using a curl command from a Shell step, but I'm stuck about how to do this from a (System?) Groovy script AND  track its progress.

Any ideas?

Thanks in advance...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.
signature.asc
Reply all
Reply to author
Forward
0 new messages