From 2e7dd3f84e592f348590220740747b9b682902a2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 24 Feb 2022 10:12:00 +1000 Subject: [PATCH] gitlab CI: fail the sanity check stage if the fork is not public Signed-off-by: Peter Hutterer --- .gitlab-ci.yml | 14 ++++++++++++++ .gitlab-ci/ci.template | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2d31848..4e2be54 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -146,6 +146,20 @@ variables: # # ################################################################# +fail-if-fork-is-not-public: + stage: sanity check + script: + - | + if [ $CI_PROJECT_VISIBILITY != "public" ]; then + echo "*************************************************************************************" + echo "Project visibility must be set to 'public'" + echo "Change this in $CI_PROJECT_URL/edit under 'Visibility, project features, permissions'" + echo "*************************************************************************************" + exit 1 + fi + except: + - main@libinput/libinput + # Re-generate the CI script and make sure it's the one currently checked in # If this job fails, re-generate the gitlab-ci.yml script, see # $SRCDIR/.gitlab-ci/generate-gitlab-ci.py diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index 640de80..9839d6d 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -127,6 +127,20 @@ variables: # # ################################################################# +fail-if-fork-is-not-public: + stage: sanity check + script: + - | + if [ $CI_PROJECT_VISIBILITY != "public" ]; then + echo "*************************************************************************************" + echo "Project visibility must be set to 'public'" + echo "Change this in $CI_PROJECT_URL/edit under 'Visibility, project features, permissions'" + echo "*************************************************************************************" + exit 1 + fi + except: + - main@libinput/libinput + # Re-generate the CI script and make sure it's the one currently checked in # If this job fails, re-generate the gitlab-ci.yml script, see # $SRCDIR/.gitlab-ci/generate-gitlab-ci.py -- 2.7.4