diff options
-rw-r--r-- | .gitlab-ci.yml | 17 | ||||
-rwxr-xr-x | .gitlab-ci/simple-junit-report.sh | 17 |
2 files changed, 34 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7ab6deb5..6e698a2a8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,6 +32,18 @@ stages: reports: junit: check-junit-report.xml +repo-sanity: + stage: review + script: + - > + if [[ -z "$CI_REGISTRY_IMAGE" ]] ; + then + .gitlab-ci/simple-junit-report.sh check-junit-report.xml \ + repo-sanity "The container registry should be enabled in the project general settings panel at $CI_PROJECT_URL/edit" ; + exit 1 ; + fi + <<: *check + check-commit-log: variables: GIT_DEPTH: "100" @@ -130,6 +142,7 @@ build-fedora-container@x86_64: variables: GIT_STRATEGY: none needs: + - repo-sanity - check-commit-log - check-merge-request @@ -142,6 +155,7 @@ build-fedora-rawhide-container@x86_64: GIT_STRATEGY: none allow_failure: true needs: + - repo-sanity - check-commit-log - check-merge-request @@ -153,6 +167,7 @@ build-fedora-container@aarch64: variables: GIT_STRATEGY: none needs: + - repo-sanity - check-commit-log - check-merge-request @@ -164,6 +179,7 @@ build-ubuntu-container@x86_64: variables: GIT_STRATEGY: none needs: + - repo-sanity - check-commit-log - check-merge-request @@ -175,6 +191,7 @@ build-alpine-container@x86_64: variables: GIT_STRATEGY: none needs: + - repo-sanity - check-commit-log - check-merge-request 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 |