Skip to content

Commit

Permalink
Merge pull request #53 from Dr-N00B/main
Browse files Browse the repository at this point in the history
  • Loading branch information
santhoshdaivajna authored Oct 6, 2023
2 parents dd58034 + 3bc5378 commit 216f3ab
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG IMAGE_REPOSITORY=quay.io/kairos

ARG LUET_VERSION=0.34.0
ARG GOLINT_VERSION=v1.52.2
ARG GOLANG_VERSION=1.19.10
ARG GOLANG_VERSION=1.21

ARG RKE2_VERSION=latest
ARG BASE_IMAGE_NAME=$(echo $BASE_IMAGE | grep -o [^/]*: | rev | cut -c2- | rev)
Expand All @@ -23,11 +23,11 @@ build-cosign:
SAVE ARTIFACT /ko-app/cosign cosign

go-deps:
FROM gcr.io/spectro-dev-public/golang:1.19-debian
FROM gcr.io/spectro-images-public/golang:${GOLANG_VERSION}-alpine
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
RUN apt-get update
RUN apk update
SAVE ARTIFACT go.mod AS LOCAL go.mod
SAVE ARTIFACT go.sum AS LOCAL go.sum

Expand All @@ -39,15 +39,13 @@ BUILD_GOLANG:
ARG SRC

IF $FIPS_ENABLED
ARG LDFLAGS=-s -w -linkmode=external -extldflags=-static
ENV CGO_ENABLED=1
ENV GOEXPERIMENT=boringcrypto
RUN go-build-fips.sh -a -o ${BIN} ./${SRC}
RUN assert-fips.sh ${BIN}
RUN assert-static.sh ${BIN}
ELSE
ARG LDFLAGS=-s -w
ENV CGO_ENABLED=0
RUN go-build.sh -a -o ${BIN} ./${SRC}
END

RUN go build -ldflags "${LDFLAGS}" -o ${BIN} ./${SRC}
SAVE ARTIFACT ${BIN} ${BIN} AS LOCAL build/${BIN}

VERSION:
Expand Down

0 comments on commit 216f3ab

Please sign in to comment.