Skip to content

dev/sg: add 'sg ci status'

Administrator requested to merge ci-status into main

Created by: bobheadxi

Get the latest build status from your currently checked out branch! This is intentionally pretty bare-bones for now so that we can start building more commands around the Buildkite API, and I expect to expand on this command based on ideas and feedback from https://github.com/sourcegraph/sourcegraph/issues/25768

~/Projects/sourcegraph/sourcegraph/dev/sg ci-status
❯ go run . ci status
Most recent build: https://buildkite.com/sourcegraph/sourcegraph/builds/110801
Commit: a09e75208110c8a507f29236401537ab9bcff44d
Started: 2021-10-06 16:10:34.528 +0000 UTC
Finished: 2021-10-06 16:17:22.84 +0000 UTC (elapsed: 6m48.312s)
❌ Status: failed
❗️ The currently checked out commit "65c76480505da521cc27a6322d5225cd89ba0fef" does not match the commit of the build found, "a09e75208110c8a507f29236401537ab9bcff44d".
Have you pushed your most recent changes yet?

~/Projects/sourcegraph/sourcegraph/dev/sg ci-status
❯ git pub

~/Projects/sourcegraph/sourcegraph/dev/sg ci-status
❯ go run . ci status
Most recent build: https://buildkite.com/sourcegraph/sourcegraph/builds/110804
Commit: 65c76480505da521cc27a6322d5225cd89ba0fef
Started: <nil>
ℹ️ Status: scheduled

~/Projects/sourcegraph/sourcegraph/dev/sg ci-status
❯ go run . ci status
Most recent build: https://buildkite.com/sourcegraph/sourcegraph/builds/110804
Commit: 65c76480505da521cc27a6322d5225cd89ba0fef
Started: 2021-10-06 16:17:49.671 +0000 UTC
ℹ️ Status: running

Merge request reports

Loading