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

Fix Go version used in Dockerfile to build the binary #323

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

clobrano
Copy link
Contributor

Why we need this PR

The Dockerfile currently installs the Go version defined in go.mod using go get. However, this method doesn't ensure that the just-installed Go version is the same one used to build the binary. Instead, the binary is still built with the Go version released with the container.

Changes made

This change downloads and extracts the Go archive corresponding to the go.mod file and sets the PATH to prioritize the current installation.

Which issue(s) this PR fixes

Test plan

The Dockerfile currently installs the Go version defined in go.mod using
go get. However, this method doesn't ensure that the just-installed Go
version is the same one used to build the binary. Instead, the binary is
still built with the Go version released with the container.

To address this issue, this change downloads and extracts the Go archive
corresponding to the go.mod file and sets the PATH to prioritize the
current installation.

Signed-off-by: Carlo Lobrano <[email protected]>
Copy link
Contributor

openshift-ci bot commented Apr 22, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@clobrano clobrano requested a review from slintes April 22, 2024 10:03
Copy link
Contributor

openshift-ci bot commented Apr 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clobrano, slintes

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@clobrano clobrano marked this pull request as ready for review April 22, 2024 11:08
@openshift-ci openshift-ci bot requested review from beekhof and razo7 April 22, 2024 11:08
@slintes slintes merged commit 2647a8c into medik8s:main Apr 23, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants