Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update goreleaser to use boring #1702

Merged
merged 6 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ builds:
binary: kanctl
main: cmd/kanctl/main.go
ldflags: &ldflags
- -s -w
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is -w ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From stack overflow - The -w turns off DWARF debugging information: you will not be able to use gdb on the binary to look at specific functions or set breakpoints or get stack traces, because all the metadata gdb needs will not be included.

- -extldflags "-static"
-X github.com/kanisterio/kanister/pkg/version.VERSION={{.Version}}
-X github.com/kanisterio/kanister/pkg/version.GIT_COMMIT={{.Commit}}
-X github.com/kanisterio/kanister/pkg/version.BUILD_DATE={{.Date}}
env: &env
- GO111MODULE=on
- CGO_ENABLED=0
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
- CC=gcc
- CXX=g++
- GO_EXTLINK_ENABLED=0
goos:
- darwin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not affect production, not sure if it affects local development for folks. Just noting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea I assumed this was tested out early on for local development.. Does not affect production.

- linux
goarch: &goarch
- amd64
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ IMAGE_NAME := $(BIN)

IMAGE := $(REGISTRY)/$(IMAGE_NAME)

BUILD_IMAGE ?= ghcr.io/kanisterio/build:v0.0.21
BUILD_IMAGE ?= ghcr.io/kanisterio/build:v0.0.22

# tag 0.1.0 is, 0.0.1 (latest) + gh + aws + helm binary
DOCS_BUILD_IMAGE ?= ghcr.io/kanisterio/docker-sphinx:0.2.0
Expand Down
2 changes: 1 addition & 1 deletion docker/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-get update && apt-get -y install apt-transport-https ca-certificates bas

COPY --from=bitnami/kubectl:1.17 /opt/bitnami/kubectl/bin/kubectl /usr/local/bin/

COPY --from=goreleaser/goreleaser:v1.2.4 /usr/local/bin/goreleaser /usr/local/bin/
COPY --from=goreleaser/goreleaser:v1.12.3 /usr/bin/goreleaser /usr/local/bin/

COPY --from=alpine/helm:3.2.0 /usr/bin/helm /usr/local/bin/

Expand Down