Add mergify merge queue configuration file (#4917)

* Add mergify.yml.

* Abstract out CI jobs to a "success" job so that a change in the CI jobs don't require modification to mergify configuration on stable branch.

* Add new jobs to the `needs` list of  `test-suite-success`.

* Set `batch_max_wait_time` to 60 s.
This commit is contained in:
Jimmy Chen
2023-12-12 16:04:29 +11:00
committed by GitHub
parent 69f1b7afec
commit 4cf4819497
4 changed files with 71 additions and 1 deletions

13
scripts/ci/check-success-job.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Check that $SUCCESS_JOB depends on all other jobs in the given $YAML
set -euf -o pipefail
YAML=$1
SUCCESS_JOB=$2
yq '... comments="" | .jobs | map(. | key) | .[]' < "$YAML" | grep -v "$SUCCESS_JOB" | sort > all_jobs.txt
yq "... comments=\"\" | .jobs.$SUCCESS_JOB.needs[]" < "$YAML" | grep -v "$SUCCESS_JOB" | sort > dep_jobs.txt
diff all_jobs.txt dep_jobs.txt || (echo "COMPLETENESS CHECK FAILED" && exit 1)
rm all_jobs.txt dep_jobs.txt
echo "COMPLETENESS CHECK PASSED"