-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
scripts: add --go-ldflags argument to operator-sdk build command #1582
scripts: add --go-ldflags argument to operator-sdk build command #1582
Conversation
Hi @ZoltanOnody. Thanks for your PR. I'm waiting for a operator-framework or openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi thanks for your PR! I am wondering if we can make this more generic, but allowing the user to pass in additional go build args in a similar way as we do with imageBuildArgs
.
Sure, I'll have a look at it. |
I generalized it & amended my commit, now we can provide any additional arguments. Now it works like:
|
@ZoltanOnody thanks so much! /ok-to-test |
You can ignore the marker test, it seems to be behaving oddly right now. But the e2e test seems to be failing as well. |
/retest |
The test seems to be working locally:
In Travis I see:
I think is just some random error caused by network issues in Travis. Could you please restart the job https://travis-ci.org/operator-framework/operator-sdk/jobs/548782267? |
@ZoltanOnody retriggered that test. |
this enables to set additional arguments for Go builds Fixes #1435
I rebased my branch and forcepushed it. When you retriggered the job, it passed so the failing test was not caused by my changes. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one nit with the CHANGELOG line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm after that one small suggestion by Joe.
Thanks so much for your contribution and patience!
Co-Authored-By: Joe Lanford <joe.lanford@gmail.com>
New changes are detected. LGTM label has been removed. |
Is it OK to change it using "Commit suggestion" via Github (I've seen this feature for the first time), or should a squash my commits locally and force push? BTW, do you have any ETA for the next release of operator-sdk? |
Yep. Using "commit suggestion" is totally fine. When one of the maintainers actually does the merge, GitHub automatically squahes everything for us, so you don't have to squash and force push.
Probably later this week unless something comes up that forces us to push it back. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for adding this in.
Description of the change:
Add --go-ldflags support to operator-sdk build command
Motivation for the change:
I need to provide build time arguments to my operator such as version. With this MR I am able to run:
Fixes #1435