Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop (kill) a build in drone

Tags:

drone.io

Is there a way to kill a build in drone before it finishes or times out?
The default timeout in drone is 6 hours (https://github.com/drone/drone/blob/master/cmd/drone/drone.go#L32) And if you have a mistake in your makefile that just get's stuck then you need to wait for 6 hours.
This is specially annoying if you have limited number of simultaneous builds. My question is about the self hosted, open source version, not the hosted version if it makes any difference.

like image 454
Ali Avatar asked Nov 11 '22 01:11

Ali


1 Answers

You can stop drone build using CLI:

drone build stop <repo/name> <build>

If build cannot be stopped/canceled, you can kill it:

drone build kill <repo/name> <build>

See more commands in drone CLI docs.

like image 158
Domas Avatar answered Jan 04 '23 02:01

Domas