Commit 87540029 authored by Ben Gamari's avatar Ben Gamari 🐢

gitlab-ci: Ensure that all commits on a branch are submodule-linted

The previous commit reworked things such that the submodule linter would
only run on the head commit. However, the linter only checks the
submodules which are touched by the commits it is asked to lint.
Consequently it would be possible for a bad submodule to sneak through.

Thankfully, we can use the handy CI_COMMIT_BEFORE_SHA attribute to
find the base commit of the push.
parent 4a72259d
Pipeline #6694 failed with stages
in 133 minutes and 52 seconds
......@@ -108,8 +108,8 @@ lint-submods-mr:
lint-submods-branch:
extends: .lint-submods
script:
- "echo Linting submodule changes for $CI_COMMIT_SHA"
- submodchecker .git $CI_COMMIT_SHA
- "echo Linting submodule changes between $CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA"
- submodchecker .git $(git rev-list $CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA)
only:
refs:
- master
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment