robot: Add hadolint as part of the automatic lint checks (#818)

* Pull out golint into its own target

Signed-off-by: Shawn Wilsher <656602+sdwilsh@users.noreply.github.com>

* run hadolint on the Docker files in images/

Signed-off-by: Shawn Wilsher <656602+sdwilsh@users.noreply.github.com>

* Ignore existing failures of hadolint, at least for now

Signed-off-by: Shawn Wilsher <656602+sdwilsh@users.noreply.github.com>

---------

Signed-off-by: Shawn Wilsher <656602+sdwilsh@users.noreply.github.com>
This commit is contained in:
Shawn Wilsher
2023-02-05 09:10:51 -08:00
committed by Itxaka
parent 203207b93d
commit ee1e77efbe

View File

@@ -20,6 +20,7 @@ ARG CGO_ENABLED=0
ARG OSBUILDER_IMAGE=quay.io/kairos/osbuilder-tools:v0.3.3
ARG GOLINT_VERSION=1.47.3
ARG GO_VERSION=1.18
ARG HADOLINT_VERSION=2.12.0
all:
BUILD +docker
@@ -141,7 +142,7 @@ dist:
RUN goreleaser build --rm-dist --skip-validate --snapshot
SAVE ARTIFACT /build/dist/* AS LOCAL dist/
lint:
golint:
ARG GO_VERSION
FROM golang:$GO_VERSION
ARG GOLINT_VERSION
@@ -150,6 +151,18 @@ lint:
COPY . .
RUN golangci-lint run
hadolint:
ARG HADOLINT_VERSION
FROM hadolint/hadolint:$HADOLINT_VERSION-alpine
WORKDIR /images
COPY images .
RUN ls
RUN find . -name "Dockerfile*" -print | xargs -r -n1 hadolint
lint:
BUILD +golint
BUILD +hadolint
luet:
FROM quay.io/luet/base:$LUET_VERSION
SAVE ARTIFACT /usr/bin/luet /luet