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

Set GOOS,GOARCH env and ldflags option in .ci/build file #147

Conversation

himanshu-kun
Copy link

What this PR does / why we need it:
Bring .ci/build in sync with Makefile way of creating binary. This is required after we started using gcr.io/distroless/static:latest-amd64 image in Dockerfile.amd64

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

  • done only for amd64 architecture
    Release note:
Bug stopping autoscaler to run because of architecture incompatibility is fixed

@himanshu-kun himanshu-kun requested review from unmarshall and a team as code owners August 2, 2022 08:15
@gardener-robot gardener-robot added needs/review Needs review size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) labels Aug 2, 2022
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Aug 2, 2022
Copy link

@unmarshall unmarshall left a comment

Choose a reason for hiding this comment

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

If you wish to reduce the size further you can strip off DWARF generation which removes the possibility for you to connect a gbd (debugger) (option to use -w)

As discussed building for different architectures (ARM64 and AMD64) will be taken up later.

@gardener-robot-ci-2 gardener-robot-ci-2 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Aug 2, 2022
@himanshu-kun
Copy link
Author

cc @ialidzhikov
Would be making a patch release...
We missed it as we created the binary using make build and not .ci/build while testing.

Copy link

@unmarshall unmarshall left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/review Needs review labels Aug 2, 2022
@ialidzhikov
Copy link
Member

Would be making a patch release... We missed it as we created the binary using make build and not .ci/build while testing.

Feel free to close gardener/gardener#6428 and open new PR with the new image.

@himanshu-kun himanshu-kun merged commit 9768494 into gardener:machine-controller-manager-provider Aug 2, 2022
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Aug 2, 2022
@himanshu-kun himanshu-kun deleted the fix-ci-build-file branch August 2, 2022 11:07
himanshu-kun added a commit to himanshu-kun/autoscaler that referenced this pull request Aug 2, 2022
* set GOOS,GOARCH env and ldflags option

* -w flag in --ldflags introduced
himanshu-kun added a commit that referenced this pull request Aug 2, 2022
* set GOOS,GOARCH env and ldflags option

* -w flag in --ldflags introduced
rishabh-11 pushed a commit to rishabh-11/autoscaler that referenced this pull request Aug 2, 2022
* set GOOS,GOARCH env and ldflags option

* -w flag in --ldflags introduced
himanshu-kun added a commit that referenced this pull request Aug 3, 2022
* updated dockerfile name and base image

* Set GOOS,GOARCH env and ldflags option in .ci/build file (#147)

* set GOOS,GOARCH env and ldflags option

* -w flag in --ldflags introduced

* rollback some cherry-pick changes

Co-authored-by: Himanshu Sharma <79965161+himanshu-kun@users.noreply.github.com>
rishabh-11 pushed a commit to rishabh-11/autoscaler that referenced this pull request Aug 3, 2022
* set GOOS,GOARCH env and ldflags option

* -w flag in --ldflags introduced
rishabh-11 pushed a commit to rishabh-11/autoscaler that referenced this pull request Aug 3, 2022
* set GOOS,GOARCH env and ldflags option

* -w flag in --ldflags introduced
himanshu-kun added a commit that referenced this pull request Aug 3, 2022
* Set GOOS,GOARCH env and ldflags option in .ci/build file (#147)

* set GOOS,GOARCH env and ldflags option

* -w flag in --ldflags introduced

* updated dockerfile name and base image

* rollback some cherry-pick changes

Co-authored-by: Himanshu Sharma <79965161+himanshu-kun@users.noreply.github.com>
himanshu-kun added a commit that referenced this pull request Aug 3, 2022
* Set GOOS,GOARCH env and ldflags option in .ci/build file (#147)

* set GOOS,GOARCH env and ldflags option

* -w flag in --ldflags introduced

* updated dockerfile name and base image

* rollback some cherry-pick changes

Co-authored-by: Himanshu Sharma <79965161+himanshu-kun@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) reviewed/lgtm Has approval for merging size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants