[Git][ghc/ghc][wip/fix-linters] 2 commits: gitlab-ci: Fix submodule linter
Ben Gamari
gitlab at gitlab.haskell.org
Fri Jun 7 15:15:37 UTC 2019
Ben Gamari pushed to branch wip/fix-linters at Glasgow Haskell Compiler / GHC
Commits:
b5bbc612 by Ben Gamari at 2019-06-07T15:15:24Z
gitlab-ci: Fix submodule linter
The job script didn't even try to compute the base commit to lint with
respect to.
- - - - -
8ec83227 by Ben Gamari at 2019-06-07T15:15:25Z
gitlab-ci: A few clarifying comments
- - - - -
1 changed file:
- .gitlab-ci.yml
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -52,6 +52,8 @@ ghc-linters:
stage: lint
image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
script:
+ # Note [Unshallow clone for linting]
+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# GitLab creates a shallow clone which means that we may not have the base
# commit of the MR being tested (e.g. if the MR is quite old), causing `git
# merge-base` to fail. Passing `--unshallow` to `git fetch` ensures that
@@ -78,6 +80,10 @@ ghc-linters:
stage: lint
image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
script:
+ # See Note [Unshallow clone for linting]
+ - git fetch --unshallow "$CI_MERGE_REQUEST_PROJECT_URL" $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
+ - base="$(git merge-base FETCH_HEAD $CI_COMMIT_SHA)"
+ - "echo Linting changes between $base..$CI_COMMIT_SHA"
- submodchecker .git $(git rev-list $base..$CI_COMMIT_SHA)
dependencies: []
tags:
@@ -100,6 +106,8 @@ lint-submods-marge:
lint-submods-mr:
extends: .lint-submods
+ # Allow failure since any necessary submodule patches may not be upstreamed
+ # yet.
allow_failure: true
only:
refs:
@@ -123,6 +131,7 @@ lint-submods-mr:
lint-changelogs:
extends: .lint-changelogs
+ # Allow failure since this isn't a final release.
allow_failure: true
only:
refs:
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/20822dd763f97708017b872c1a34e331fac2006f...8ec83227c4b6b1c8d5c5e66fae601650a5f22837
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/20822dd763f97708017b872c1a34e331fac2006f...8ec83227c4b6b1c8d5c5e66fae601650a5f22837
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/20190607/4298487c/attachment-0001.html>
More information about the ghc-commits
mailing list