I’m trying to figure out how to remove or kill a stuck build in Running state, which I can’t get rid of - this is in drone:0.8.1.
When I try to cancel the build in the UI, I get the error “Failed to cancel your build”.
The host is an Ubuntu 14.04 machine with Docker 17.09.0-ce.
In another discourse post, I noticed a mention of a “kill” CLI command which sounded like it was for terminating builds; does that still exist in the 0.8.0 CLI release?
A system administrator can use the
drone kill command to force kill a running build. This command is only available in drone 0.8.0 (stable) and higher.
$ drone build kill --help
drone build kill - force kill a build
drone build kill <repo/name> <build>
Thank you very much!
drone build kill in the CLI did the trick and removed my wedged Running builds.
One thing that was strange: To give myself admin access, I added myself as the last username in my comma-separated DRONE_ADMIN list, but drone wouldn’t allow me to run the build kill command until I removed the other user in the admin list.
Is there any known issue in 0.8.1 involving multiple usernames in DRONE_ADMIN, by chance?
Nope, I have multiple admin users defined in my drone instance and it is working as expected.
Usually when we get reports of this field not working as expected it is because the username casing does not match, or there is whitespace accidentally included in the string.
Thanks! I was looking for this. I didn’t see the subcommand in the help, though. It would be great to put that in there.
> drone build -h
drone build - manage builds
drone build command [command options] [arguments...]
ls show build history
last show latest build details
logs show build logs
info show build details
stop stop a build
start start a build
approve approve a build
decline decline a build
queue show build queue
ps show build steps
--help, -h show help