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 Fetching Go version in Dockerfile #134

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

razo7
Copy link
Member

@razo7 razo7 commented Sep 5, 2024

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

Similar to medik8s/node-healthcheck-operator#323 from NHC

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.
Copy link
Contributor

openshift-ci bot commented Sep 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: razo7

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

@openshift-ci openshift-ci bot added the approved label Sep 5, 2024
@razo7
Copy link
Member Author

razo7 commented Sep 5, 2024

/retest

@slintes
Copy link
Member

slintes commented Sep 5, 2024

/lgtm

@slintes
Copy link
Member

slintes commented Sep 6, 2024

/retest

@openshift-merge-bot openshift-merge-bot bot merged commit 9501562 into medik8s:main Sep 6, 2024
27 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