Commit c1999211 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Ben Gamari

Restore missing script

This was incorrectly dropped with the old CI infrastructure.
parent bea74e3f
Pipeline #12978 failed with stages
in 169 minutes and 28 seconds
......@@ -72,6 +72,9 @@ let
--set USE_NIX 1 \
--set CI_CONFIG ${./}
makeWrapper ${./} $out/bin/find-job \
--prefix PATH : ${stdenv.lib.makeBinPath deps}:$out/bin
makeWrapper ${xz}/bin/xz $out/bin/xz
#!/usr/bin/env bash
set -e
# Access token is a protected environment variable in the head.hackage project and
# is necessary for this query to succeed. Sadly job tokens only seem to
# give us access to the project being built.
curl \
--silent --show-error \
-H "Private-Token: $ACCESS_TOKEN" \
"$project_id/pipelines/$pipeline_id/jobs?scope[]=success" \
> resp.json
job_id=$(jq ". | map(select(.name == \"$job_name\")) | .[0].id" < resp.json)
if [ "$job_id" = "null" ]; then
echo "Error finding job $job_name for $pipeline_id in project $project_id:" >&2
cat resp.json >&2
rm resp.json
exit 1
rm resp.json
echo -n "$job_id"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment