From 35526d70610a1cc5fa84fe04fe666caa3c980edf Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sat, 23 Nov 2019 22:05:22 +0200 Subject: [PATCH] Pre-commit. Add pre-commit hooks. Fix warning from hadolint. --- .pre-commit-config.yaml | 24 ++++++++++++++++++++++++ Dockerfile | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..d5ae7ee --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,24 @@ +# vim:ff=unix ts=2 sw=2 ai expandtab +--- +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.4.0 + hooks: + - id: check-added-large-files + - id: check-merge-conflict + - id: trailing-whitespace + exclude: \.diff$ + - repo: https://github.com/adrienverge/yamllint + rev: v1.19.0 + hooks: + - id: yamllint + - repo: https://github.com/amperser/proselint/ + rev: 0.10.2 + hooks: + - id: proselint + types: [plain-text] + exclude: LICENSE + - repo: https://www.shore.co.il/git/docker-pre-commit + rev: v0.3.0 + hooks: + - id: hadolint diff --git a/Dockerfile b/Dockerfile index 5135ae9..a48d23b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM alpine:3.10 as downloader ARG URL=https://github.com/aptible/supercronic/releases/download/v0.1.9/supercronic-linux-amd64 ARG SHA1SUM=5ddf8ea26b56d4a7ff6faecdd8966610d5cb9d85 -RUN cd /tmp && \ - wget $URL && \ +WORKDIR /tmp +RUN wget $URL && \ echo "$SHA1SUM supercronic-linux-amd64" > sha1.sum && \ sha1sum -c sha1.sum && \ install -m 755 supercronic-linux-amd64 /usr/local/bin/supersonic && \ -- GitLab