-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Builds and pushes for arm64 Signed-off-by: Noel Georgi <[email protected]>
- Loading branch information
Showing
5 changed files
with
57 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,21 +2,21 @@ | |
|
||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. | ||
# | ||
# Generated on 2022-08-31T21:36:31Z by kres ec2cd64. | ||
# Generated on 2022-09-05T17:08:38Z by kres 871f67c. | ||
|
||
ARG TOOLCHAIN | ||
|
||
# cleaned up specs and compiled versions | ||
FROM scratch AS generate | ||
|
||
FROM ghcr.io/siderolabs/ca-certificates:v1.1.0 AS image-ca-certificates | ||
FROM ghcr.io/siderolabs/ca-certificates:v1.2.0 AS image-ca-certificates | ||
|
||
FROM ghcr.io/siderolabs/fhs:v1.1.0 AS image-fhs | ||
FROM ghcr.io/siderolabs/fhs:v1.2.0 AS image-fhs | ||
|
||
# runs markdownlint | ||
FROM docker.io/node:18.7.0-alpine3.16 AS lint-markdown | ||
FROM docker.io/node:18.8.0-alpine3.16 AS lint-markdown | ||
WORKDIR /src | ||
RUN npm i -g markdownlint-cli@0.31.1 | ||
RUN npm i -g markdownlint-cli@0.32.2 | ||
RUN npm i [email protected] | ||
COPY .markdownlint.json . | ||
COPY ./README.md ./README.md | ||
|
@@ -27,7 +27,7 @@ FROM ${TOOLCHAIN} AS toolchain | |
RUN apk --update --no-cache add bash curl build-base protoc protobuf-dev | ||
|
||
# build tools | ||
FROM toolchain AS tools | ||
FROM --platform=${BUILDPLATFORM} toolchain AS tools | ||
ENV GO111MODULE on | ||
ENV CGO_ENABLED 0 | ||
ENV GOPATH /go | ||
|
@@ -55,6 +55,24 @@ COPY ./cmd ./cmd | |
COPY ./internal ./internal | ||
RUN --mount=type=cache,target=/go/pkg go list -mod=readonly all >/dev/null | ||
|
||
# builds bldr-darwin-amd64 | ||
FROM base AS bldr-darwin-amd64-build | ||
COPY --from=generate / / | ||
WORKDIR /src/cmd/bldr | ||
ARG VERSION_PKG="github.com/siderolabs/bldr/internal/version" | ||
ARG SHA | ||
ARG TAG | ||
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOARCH=amd64 GOOS=darwin go build -ldflags "-s -w -X ${VERSION_PKG}.Name=bldr -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /bldr-darwin-amd64 | ||
|
||
# builds bldr-darwin-arm64 | ||
FROM base AS bldr-darwin-arm64-build | ||
COPY --from=generate / / | ||
WORKDIR /src/cmd/bldr | ||
ARG VERSION_PKG="github.com/siderolabs/bldr/internal/version" | ||
ARG SHA | ||
ARG TAG | ||
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOARCH=arm64 GOOS=darwin go build -ldflags "-s -w -X ${VERSION_PKG}.Name=bldr -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /bldr-darwin-arm64 | ||
|
||
# builds bldr-linux-amd64 | ||
FROM base AS bldr-linux-amd64-build | ||
COPY --from=generate / / | ||
|
@@ -105,6 +123,12 @@ FROM base AS unit-tests-run | |
ARG TESTPKGS | ||
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg --mount=type=cache,target=/tmp go test -v -covermode=atomic -coverprofile=coverage.txt -coverpkg=${TESTPKGS} -count 1 ${TESTPKGS} | ||
|
||
FROM scratch AS bldr-darwin-amd64 | ||
COPY --from=bldr-darwin-amd64-build /bldr-darwin-amd64 /bldr-darwin-amd64 | ||
|
||
FROM scratch AS bldr-darwin-arm64 | ||
COPY --from=bldr-darwin-arm64-build /bldr-darwin-arm64 /bldr-darwin-arm64 | ||
|
||
FROM scratch AS bldr-linux-amd64 | ||
COPY --from=bldr-linux-amd64-build /bldr-linux-amd64 /bldr-linux-amd64 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.