diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2022-02-17 22:22:17 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2022-03-07 10:04:59 +0100 |
commit | 9cabc41a3700255c4c35668c10806c7217e40ab3 (patch) | |
tree | 3a4cff2eb6297c11a16bc6f727b588e1add69b7a /.gitlab-ci | |
parent | 36625a9807c3a78ba708ced224a4f0e79eb9196a (diff) | |
download | tracker-9cabc41a3700255c4c35668c10806c7217e40ab3.tar.gz |
ci: Add repo-sanity check
It is somewhat easy to dismiss failed build images as errors in
the pipeline rather than errors in the repository configuration.
Make a separate check in the review stage testing that the user
repository is in a state able to run the rest of CI (e.g. generating
or storing images in its own container registry, since this is
necessary with ci-templates).
The error message is made known through both junit and CI job output.
Diffstat (limited to '.gitlab-ci')
-rwxr-xr-x | .gitlab-ci/simple-junit-report.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/.gitlab-ci/simple-junit-report.sh b/.gitlab-ci/simple-junit-report.sh new file mode 100755 index 000000000..120c325f1 --- /dev/null +++ b/.gitlab-ci/simple-junit-report.sh @@ -0,0 +1,17 @@ +OUTFILE=$1 +NAME=$2 +MESSAGE=$3 + +cat >$OUTFILE <<EOF +<?xml version='1.0' encoding='utf-8'?> +<testsuites tests="1" errors="0" failures="1"> + <testsuite name="tracker" tests="1" errors="0" failures="1"> + <testcase name="$NAME" classname="tracker"> + <failure message="$MESSAGE"/> + </testcase> + </testsuite> +</testsuites> +EOF + +# Also echo the message in stdout for good measure +echo $MESSAGE |