about summary refs log tree commit diff
path: root/ops/pipelines/static-pipeline.yaml
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-11-25T09·58+0300
committerVincent Ambo <mail@tazj.in>2021-11-29T20·38+0300
commit6edfdd0773264b058736a8fb3887050d48a06c67 (patch)
treec4ced0382a57e284df33c585489e986d602967a7 /ops/pipelines/static-pipeline.yaml
parent8de6c07153d59c6fce9c1ed0eb7d8d2ad9b1d70c (diff)
refactor(ops/pipelines): Query build status from Buildkite API r/3116
Instead of manually tracking the build status through Buildkite
metadata, use the Buildkite GraphQL API in the `:duck:` build
step (i.e. the one that determines the status of the entire pipeline
to be reported back to Gerrit) to fetch the number of failed jobs.

This way we have less manual state accounting in the pipeline.

The downside is that the GraphQL query embedded here is a little hard
to read.

Notes:

  * This needs an access token for Buildkite. We already have one for
    besadii which is also run by the agents, so I've given it GraphQL
    permissions and reused it.

  * I almost introduced a very rare bug here: My initial intuition was
    to simply `exit $FAILED_JOBS` - in the extremely rare case where
    `$FAILED_JOBS % 256 = 0` this would mean we would ... fail to fail
    the build :)

Change-Id: I61976b11b591d722494d3010a362b544efe2cb25
Diffstat (limited to 'ops/pipelines/static-pipeline.yaml')
-rw-r--r--ops/pipelines/static-pipeline.yaml1
1 files changed, 0 insertions, 1 deletions
diff --git a/ops/pipelines/static-pipeline.yaml b/ops/pipelines/static-pipeline.yaml
index 2261b11b80..c864aea657 100644
--- a/ops/pipelines/static-pipeline.yaml
+++ b/ops/pipelines/static-pipeline.yaml
@@ -14,7 +14,6 @@ steps:
       }
 
       nix-build -A ops.pipelines.depot -o depot.yaml --show-trace || fallback
-      buildkite-agent meta-data set 'failure' '0'
       buildkite-agent pipeline upload depot.yaml || fallback
 
   # Create a revision number for the current commit for builds on