From: Štěpán Balážik Date: Thu, 13 Aug 2020 11:08:16 +0000 (+0200) Subject: ci: check whether Deckard submodule commit is present on master X-Git-Tag: v5.1.3~13^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5c2f2abb601f2d2b32369c05f6b7bcee269f7b7;p=thirdparty%2Fknot-resolver.git ci: check whether Deckard submodule commit is present on master This is to prevent issues like https://gitlab.nic.cz/knot/knot-resolver/-/merge_requests/1036 --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 02b14dc18..1781825f2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -168,6 +168,12 @@ build:darwin: script: - ci/travis.py ${CI_COMMIT_REF_NAME} +deckard_commit: + <<: *test_nodep + script: + - ci/deckard_commit_check.sh + allow_failure: true + deckard: <<: *test_flaky tags: diff --git a/ci/deckard_commit_check.sh b/ci/deckard_commit_check.sh new file mode 100755 index 000000000..5b4016d8e --- /dev/null +++ b/ci/deckard_commit_check.sh @@ -0,0 +1,13 @@ +DECKARD_COMMIT=$(git ls-tree HEAD:tests/integration/ | grep commit | grep deckard | cut -f1 | cut -f3 '-d ') +DECKARD_PATH="tests/integration/deckard" +pushd $DECKARD_PATH > /dev/null +if git merge-base --is-ancestor $DECKARD_COMMIT origin/master; then + echo "Deckard submodule commit is on in its master branch. All good in the hood." + exit 0 +else + echo "Deckard submodule commit $DECKARD_COMMIT is not in Deckard's master branch." + echo "This WILL cause CI breakages so make sure your changes in Deckard are merged" + echo "or point the submodule to another commit." + exit 1 +fi +