Skip to content

Instantly share code, notes, and snippets.

@armand1m
Last active March 4, 2020 14:22
Show Gist options
  • Save armand1m/8dc2ebdcd6f5f9cbf2613a4353094384 to your computer and use it in GitHub Desktop.
Save armand1m/8dc2ebdcd6f5f9cbf2613a4353094384 to your computer and use it in GitHub Desktop.
Fixes a stale drone stage state in Drone CI database directly.
-- You can use either 'error', 'failure' or 'success' as a status on each of these.
UPDATE stages SET stage_status = 'success' WHERE stage_id = $stage_id;
UPDATE builds SET build_status = 'success' WHERE build_id = $build_id;
UPDATE steps SET step_status = 'success' WHERE step_id = $step_id;
-- This timestamp must be bigger than the step_started field of the steps table.
UPDATE steps SET step_stopped = 1583330000 WHERE step_id = $step_id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment