From 4e2b94c42b35d38b599b103a398f90adef254f2a Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Sat, 16 Jul 2022 14:28:22 +0000 Subject: [PATCH] robot: Run lint checks --- Earthfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Earthfile b/Earthfile index 5f7fd0d..80b65f1 100644 --- a/Earthfile +++ b/Earthfile @@ -79,6 +79,23 @@ build: BUILD +build-c3os-agent BUILD +build-c3os-agent-provider +dist: + FROM golang + RUN echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list + RUN apt update + RUN apt install -y goreleaser + WORKDIR /build + COPY . . + RUN goreleaser build --rm-dist --skip-validate --snapshot + SAVE ARTIFACT /build/dist/* AS LOCAL dist/ + +lint: + FROM golang:alpine + RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.46.2 + WORKDIR /build + COPY . . + RUN golangci-lint run + luet: FROM quay.io/luet/base:$LUET_VERSION SAVE ARTIFACT /usr/bin/luet /luet