Wait for node idle?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Wait for node idle?

Sami Tikka
Is there an easy way to wait for a slave to become idle?

I thought the cli command sequence offline-node followed by wait-node-offline would do the trick but no. Wait-node-offline returns immediately even when the node is still completing a build.

I just blew away a test build that takes 2.5 hours to run :)

-- Sami
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Wait for node idle?

Sami Tikka
I found this as a workaround:

while [ $(curl -fsk
"$JENKINS_URL/computer/$BUILDER_NAME/api/xml?xpath=*/idle/text()") !=
"true" ]; do
     sleep 5;
done

2012/2/21 Sami Tikka <[hidden email]>:
> Is there an easy way to wait for a slave to become idle?
>
> I thought the cli command sequence offline-node followed by wait-node-offline would do the trick but no. Wait-node-offline returns immediately even when the node is still completing a build.
>
> I just blew away a test build that takes 2.5 hours to run :)
>
> -- Sami
Loading...