mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-26 05:57:04 +00:00
robot: Pin golang version
In order to workaround https://github.com/golangci/golangci-lint/issues/2374
This commit is contained in:
committed by
Itxaka
parent
7d3c952e8b
commit
5b06825dc5
14
Earthfile
14
Earthfile
@@ -19,7 +19,7 @@ ARG COSIGN_EXPERIMENTAL=0
|
|||||||
ARG CGO_ENABLED=0
|
ARG CGO_ENABLED=0
|
||||||
ARG ELEMENTAL_IMAGE=quay.io/costoolkit/elemental-cli:v0.0.15-8a78e6b
|
ARG ELEMENTAL_IMAGE=quay.io/costoolkit/elemental-cli:v0.0.15-8a78e6b
|
||||||
ARG GOLINT_VERSION=1.47.3
|
ARG GOLINT_VERSION=1.47.3
|
||||||
|
ARG GO_VERSION=1.18
|
||||||
|
|
||||||
all:
|
all:
|
||||||
BUILD +docker
|
BUILD +docker
|
||||||
@@ -32,7 +32,8 @@ all-arm:
|
|||||||
BUILD +arm-image
|
BUILD +arm-image
|
||||||
|
|
||||||
go-deps:
|
go-deps:
|
||||||
FROM golang
|
ARG GO_VERSION
|
||||||
|
FROM golang:$GO_VERSION
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
@@ -83,7 +84,8 @@ build:
|
|||||||
BUILD +build-c3os-agent-provider
|
BUILD +build-c3os-agent-provider
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
FROM golang
|
ARG GO_VERSION
|
||||||
|
FROM golang:$GO_VERSION
|
||||||
RUN echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
|
RUN echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
|
||||||
RUN apt update
|
RUN apt update
|
||||||
RUN apt install -y goreleaser
|
RUN apt install -y goreleaser
|
||||||
@@ -93,7 +95,8 @@ dist:
|
|||||||
SAVE ARTIFACT /build/dist/* AS LOCAL dist/
|
SAVE ARTIFACT /build/dist/* AS LOCAL dist/
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
FROM golang:alpine
|
ARG GO_VERSION
|
||||||
|
FROM golang:$GO_VERSION
|
||||||
ARG GOLINT_VERSION
|
ARG GOLINT_VERSION
|
||||||
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v$GOLINT_VERSION
|
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v$GOLINT_VERSION
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
@@ -343,7 +346,8 @@ trivy-scan:
|
|||||||
RUN /trivy filesystem --severity $SEVERITY --exit-code 1 --no-progress /
|
RUN /trivy filesystem --severity $SEVERITY --exit-code 1 --no-progress /
|
||||||
|
|
||||||
linux-bench:
|
linux-bench:
|
||||||
FROM golang
|
ARG GO_VERSION
|
||||||
|
FROM golang:$GO_VERSION
|
||||||
GIT CLONE https://github.com/aquasecurity/linux-bench /linux-bench-src
|
GIT CLONE https://github.com/aquasecurity/linux-bench /linux-bench-src
|
||||||
RUN cd /linux-bench-src && CGO_ENABLED=0 go build -o linux-bench . && mv linux-bench /
|
RUN cd /linux-bench-src && CGO_ENABLED=0 go build -o linux-bench . && mv linux-bench /
|
||||||
SAVE ARTIFACT /linux-bench /linux-bench
|
SAVE ARTIFACT /linux-bench /linux-bench
|
||||||
|
Reference in New Issue
Block a user