diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7aadfceb2..5020c9bed 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -237,6 +237,29 @@ workflow: - if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME when: on_success +repo-sanity: + extends: + - .fdo.ci-fairy + stage: review + variables: + GIT_DEPTH: "1" + 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 + artifacts: + expire_in: 1 week + paths: + - check-junit-report.xml + reports: + junit: check-junit-report.xml + rules: + - !reference [.only-merge-requests, rules] + check-commit-log: extends: - .fdo.ci-fairy diff --git a/.gitlab-ci/simple-junit-report.sh b/.gitlab-ci/simple-junit-report.sh new file mode 100755 index 000000000..3a60324d3 --- /dev/null +++ b/.gitlab-ci/simple-junit-report.sh @@ -0,0 +1,18 @@ +#!/bin/bash +OUTFILE=$1 +NAME=$2 +MESSAGE=$3 + +cat >$OUTFILE < + + + + + + + +EOF + +# Also echo the message in stdout for good measure +echo $MESSAGE