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

Build container using x.y.z golang version and updating Golang version #133

Closed
wants to merge 1 commit into from

Conversation

razo7
Copy link
Member

@razo7 razo7 commented Mar 15, 2024

Why we need this PR

Simplify how the Dockerfile fetches the Golang version for building the binary.

Changes made

  • Fetch the Golang version from the go directive in go.mod, and download it using the repos of the base image (CentOS stream 8) instead of using the official website to download and extract the newer Golang version
  • Upgrade Golang 1.20-> 1.21.7 and use the patch version in go.mod
  • Modify ci-operator.yaml file for Golang builder in OCP CI.

Which issue(s) this PR fixes

Follow up to #132, and should not be merged beforehand.

Copy link
Contributor

openshift-ci bot commented Mar 15, 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

Copy link
Contributor

openshift-ci bot commented Mar 15, 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

@slintes
Copy link
Member

slintes commented Mar 15, 2024

/test 4.15-test

@razo7
Copy link
Member Author

razo7 commented Mar 17, 2024

/test 4.15-test

@razo7 razo7 force-pushed the use-patch-version-go-dockerfile branch from dcb1a19 to 509fd4c Compare March 17, 2024 07:00
@razo7
Copy link
Member Author

razo7 commented Mar 17, 2024

/test 4.15-test

This new version must be found in the Dockerfile base image, CentOS stream 8, otherwise building the container would fail
@razo7 razo7 force-pushed the use-patch-version-go-dockerfile branch from 509fd4c to 3973de3 Compare March 17, 2024 07:02
@razo7
Copy link
Member Author

razo7 commented Mar 17, 2024

/test 4.15-test

@razo7
Copy link
Member Author

razo7 commented Mar 17, 2024

/test 4.15-openshift-e2e

@razo7
Copy link
Member Author

razo7 commented Mar 19, 2024

There is a tradeoff for using a patch version (here and eventually aligning it in other places) for Golang builder, and the pros won't overcome the cons. It might be more relevant in the future, but not for now.

@razo7 razo7 closed this Mar 19, 2024
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.

3 participants