Skip to content

Commit 6653986

Browse files
committed
build: Clean up goreleaser stuff
1 parent 5cc02ae commit 6653986

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

.goreleaser.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ builds:
3535
- -w
3636
goos:
3737
- linux
38-
- windows
39-
- darwin
4038
goarch:
4139
- amd64
4240
- arm64
@@ -47,9 +45,6 @@ builds:
4745
archives:
4846
- name_template: '{{ .ProjectName }}_v{{trimprefix .Version "v"}}_{{ .Os }}_{{ .Arch }}'
4947
rlcp: true
50-
format_overrides:
51-
- goos: windows
52-
format: zip
5348
builds:
5449
- capi-runtime-extensions
5550
dockers:

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ kustomize 4.5.7
99
pre-commit 3.0.2
1010
shfmt 3.6.0
1111
upx 4.0.2
12+
gcloud 416.0.0

Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
# Copyright 2023 D2iQ, Inc. All rights reserved.
44
# SPDX-License-Identifier: Apache-2.0
55

6-
# Production image
7-
FROM gcr.io/distroless/static:nonroot
8-
WORKDIR /
9-
COPY /bin/manager .
6+
FROM --platform=linux/amd64 gcr.io/distroless/static@sha256:39e460e64a929bb6d08a7b899eb76c78c17a487b84f7cfe5191415473423471f as linux-amd64
7+
FROM --platform=linux/arm64 gcr.io/distroless/static@sha256:b5e90ec08ae3e1e72b28a92caf75e9e9f6eae54624e34486155349843d420126 as linux-arm64
8+
9+
FROM --platform=linux/${TARGETARCH} linux-${TARGETARCH}
10+
11+
COPY capi-runtime-extensions /usr/local/bin/capi-runtime-extensions
12+
1013
# Use uid of nonroot user (65532) because kubernetes expects numeric user when applying pod security policies
1114
USER 65532
12-
ENTRYPOINT ["/manager"]
15+
ENTRYPOINT ["/usr/local/bin/capi-runtime-extensions"]

make/goreleaser.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ build-snapshot: dockerauth install-tool.goreleaser install-tool.golang go-genera
1414
goreleaser --debug=$(GORELEASER_DEBUG) \
1515
build \
1616
--snapshot \
17-
--rm-dist \
17+
--clean \
1818
--parallelism=$(GORELEASER_PARALLELISM) \
1919
$(if $(BUILD_ALL),,--single-target) \
2020
--skip-post-hooks
@@ -24,7 +24,7 @@ release: ## Builds a release with goreleaser
2424
release: dockerauth install-tool.goreleaser install-tool.golang go-generate ; $(info $(M) building release $*)
2525
goreleaser --debug=$(GORELEASER_DEBUG) \
2626
release \
27-
--rm-dist \
27+
--clean \
2828
--parallelism=$(GORELEASER_PARALLELISM) \
2929
--timeout=60m \
3030
$(GORELEASER_FLAGS)
@@ -36,6 +36,6 @@ release-snapshot: dockerauth install-tool.goreleaser install-tool.golang go-gene
3636
release \
3737
--snapshot \
3838
--skip-publish \
39-
--rm-dist \
39+
--clean \
4040
--parallelism=$(GORELEASER_PARALLELISM) \
4141
--timeout=60m

0 commit comments

Comments
 (0)