[Git][ghc/ghc][master] gitlab-ci: Ensure that all commits on a branch are submodule-linted
Ben Gamari
gitlab at gitlab.haskell.org
Sat Jun 8 20:47:02 UTC 2019
Ben Gamari pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
87540029 by Ben Gamari at 2019-06-08T20:44:55Z
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.
- - - - -
1 changed file:
- .gitlab-ci.yml
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -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
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/8754002973dcde8709458044e541ddc8f4fcf6bb
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/8754002973dcde8709458044e541ddc8f4fcf6bb
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190608/016026b3/attachment.html>
More information about the ghc-commits
mailing list