Wait for Release to finish

#1

I am using XLR and trying the Core -> Create Release task and I notice it launches the sub-release and returns right away with success if that trigger works. What I would like instead is to have the task wait for the successful completion of the sub-release.

My use case is that I’m trying to organize several sub-releases and my team will want to see the status collected accurately at the top level for the success or failure of sub-releases. Our nested releases may take some time, so seeing the status from the top-level master release would be helpful.

How do you recommend I do this?

#2

Hi Marco – it is currently not possible to have a ‘blocking’ CreateReleaseTask.

What you need to do is to capture the release ID output variable of the CreateReleaseTask and add a GateTask to wait for the completion of that variable.

If you have several subreleases to wait for, you can combine them into one GateTask, since a single GateTask supports waiting for several releases.

Hope this helps!

Kind regards,

Hes Siemelink

2 Likes
#3

Okay - thank you. I tested the example of creating a variable to hold the release ID, and then I used it as the “Waiting for completion of” a variable on that same release ID.

This does the trick.

#4

Another option is to install the xlr-xlrelease plugin at https://github.com/xebialabs-community/xlr-xlrelease-plugin This has a task called Sub Release that creates a subrelease. There is a setting called Async that allows the single task to wait for successful completion of the subrelease.