diff options
author | Ben Gamari <ben@smart-cactus.org> | 2018-12-13 13:53:27 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-12-13 21:59:20 -0500 |
commit | e9f68a1529687b11e22cf2b28e119b043dded6a6 (patch) | |
tree | 64199b60c6e966bd1bd1ba8b50f8cb35ba51bff5 /.circleci | |
parent | 9b8713e8bf905c17251a0fad22eee690c4e50f0c (diff) | |
download | haskell-e9f68a1529687b11e22cf2b28e119b043dded6a6.tar.gz |
gitlab-ci: Add linters
These are taken from our previous arcanist linters as well as the
gitolite hooks but with some heavy refactoring.
Diffstat (limited to '.circleci')
-rw-r--r-- | .circleci/images/linters/Dockerfile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/.circleci/images/linters/Dockerfile b/.circleci/images/linters/Dockerfile new file mode 100644 index 0000000000..cd9aa30e69 --- /dev/null +++ b/.circleci/images/linters/Dockerfile @@ -0,0 +1,30 @@ +FROM debian:stretch + +ENV LANG C.UTF-8 + +RUN apt-get update -qq; apt-get install -qy gnupg sudo git python3 + +RUN echo 'deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main' > /etc/apt/sources.list.d/ghc.list +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6F88286 +RUN apt-get update -qq + +# Basic Haskell toolchain +RUN apt-get install -qy cabal-install-2.2 ghc-8.4.2 +ENV PATH /home/ghc/.local/bin:/opt/cabal/2.2/bin:/opt/ghc/8.4.2/bin:$PATH + +# Create a normal user. +RUN adduser ghc --gecos "GHC builds" --disabled-password +RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc +USER ghc +WORKDIR /home/ghc/ + +# Build Linting tools +RUN cabal update + +RUN git clone git://github.com/haskell-infra/git-haskell-org-hooks && \ + cd git-haskell-org-hooks && \ + cabal install + +ENV PATH /home/ghc/.cabal/bin:$PATH + +CMD ["bash"] |