From eb136d137a6b99f9ed5ef7de8f77b282bce47bd6 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 1 Mar 2020 20:31:28 +0800 Subject: [PATCH] chore: support dockerfile lint. (#479) --- .drone.yml | 13 +++++++++++++ pipeline.libsonnet | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/.drone.yml b/.drone.yml index 9511bab..a5530a7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -43,6 +43,19 @@ steps: - name: gopath path: /go +- name: hadolint + pull: always + image: hadolint/hadolint:latest-debian + commands: + - hadolint --version + - hadolint docker/Dockerfile.linux.amd64 + - hadolint docker/Dockerfile.linux.arm64 + - hadolint docker/Dockerfile.linux.arm + - hadolint docker/Dockerfile.windows.amd64 + volumes: + - name: gopath + path: /go + - name: test pull: always image: golang:1.14 diff --git a/pipeline.libsonnet b/pipeline.libsonnet index 71e7aef..0683fd1 100644 --- a/pipeline.libsonnet +++ b/pipeline.libsonnet @@ -63,6 +63,24 @@ }, ], }, + { + name: 'hadolint', + image: 'hadolint/hadolint:latest-debian', + pull: 'always', + commands: [ + 'hadolint --version', + 'hadolint docker/Dockerfile.linux.amd64', + 'hadolint docker/Dockerfile.linux.arm64', + 'hadolint docker/Dockerfile.linux.arm', + 'hadolint docker/Dockerfile.windows.amd64', + ], + volumes: [ + { + name: 'gopath', + path: '/go', + }, + ], + }, { name: 'test', image: 'golang:1.14',