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 up Golang using go.mod file #76

Merged
merged 2 commits into from
May 31, 2023

Conversation

razo7
Copy link
Member

@razo7 razo7 commented May 22, 2023

Save time and possible errors of updating Golang version by fetching it from go.mod file:

  • No longer need to set Golang version in github CI.
  • No longer need to set Golang version in Dockerfile.

Needed for running `test` target and use go.mod and go.sum files
@openshift-ci openshift-ci bot requested review from clobrano and slintes May 22, 2023 08:59
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 22, 2023

[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

@clobrano
Copy link
Contributor

clobrano commented May 22, 2023

I remember a similar PR in NMO, where Marc also updated the Dockerfile to ensure the go version was the same as defined in go.mod.
Do you think we need it here as well?

@razo7
Copy link
Member Author

razo7 commented May 22, 2023

I remember a similar PR in NMO, where Marc also updated the Dockerfile to ensure the go version was the same as defined in go.mod. Do you think we need it here as well?

I can add the Dockerfile change. Do you want me to add the CI build_root_image as well?

@clobrano
Copy link
Contributor

Do you want me to add the CI build_root_image as well?

I don't know what is the effect of that file 😅

@razo7
Copy link
Member Author

razo7 commented May 22, 2023

Do you want me to add the CI build_root_image as well?

I don't know what is the effect of that file sweat_smile

IIUC the .ci-operator.yaml file was used in NHC to replace the build image , so that Marc doesn't need to modify the base image in CI. He could simply do it from NHC github repo.

Usually we use Golang base image as build images and we modify it in CI, after we have changed our code Golang version. By using the .ci-operator.yaml file we can update Golang version in CI from NHC github repo without worrying about CI.

FYI MDR already use this file - https://github.com/medik8s/machine-deletion-remediation/blob/main/.ci-operator.yaml

One less place to update Golang version
@razo7 razo7 changed the title Set up Golang in Pre Submit Github Action Set up Golang from go.mod file May 23, 2023
@razo7 razo7 changed the title Set up Golang from go.mod file Set up Golang using go.mod file May 23, 2023
@clobrano
Copy link
Contributor

/lgtm

@razo7
Copy link
Member Author

razo7 commented May 24, 2023

/retest

6 similar comments
@razo7
Copy link
Member Author

razo7 commented May 25, 2023

/retest

@razo7
Copy link
Member Author

razo7 commented May 25, 2023

/retest

@razo7
Copy link
Member Author

razo7 commented May 25, 2023

/retest

@razo7
Copy link
Member Author

razo7 commented May 25, 2023

/retest

@razo7
Copy link
Member Author

razo7 commented May 28, 2023

/retest

@razo7
Copy link
Member Author

razo7 commented May 31, 2023

/retest

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