-
Notifications
You must be signed in to change notification settings - Fork 83
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 uses OS and ARCH variables. #129
Conversation
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.
Thanks for the PR. This would help to contributors.
CI is failing though, could you have a look at it? Maybe you should consider using GOOS and GARCH and extract them using go tool rather than using the variables that we generated using uname
README.md
Outdated
@@ -266,6 +266,11 @@ Targets: | |||
help Shows this help message | |||
``` | |||
|
|||
For testing purposes you might want to build your container and push it into your own container registry. Use this command for it: | |||
``` | |||
CONTAINER_REPO=<your-container-reginstry-address>/drone-cache OS=linux ARCH=amd64 make container-push |
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.
CONTAINER_REPO=<your-container-reginstry-address>/drone-cache OS=linux ARCH=amd64 make container-push | |
CONTAINER_REPO=<your-container-registry-address>/drone-cache OS=linux ARCH=amd64 make container-push |
@kakkoyun I suggest using But when now |
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.
Let's not hard code OS and ARCH values.
CI failing because documentation generation issues. Try make docs
or make README.md
and commit changes. This is not relevant to your changes, it'd be great if you can just check them in.
@@ -1,7 +1,7 @@ | |||
include .bingo/Variables.mk | |||
|
|||
OS ?= $(shell uname -s | tr '[A-Z]' '[a-z]') | |||
ARCH ?= $(shell uname -m) | |||
OS ?= linux |
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.
Why are we hard-coding these? Without these parameters go
tool itself pretty clever to determine the os and architecture by given these default you introduce a regression for user. They need to specify those to build. This is not what we want.
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.
I, for example, use macbook for development and if I build container without specifying OS, I get darwin
. This leads to runtime error as my drone uses linux to execute pipelines. I really doubt that anyone would do it on macos, but for those who would, goreleaser will make correct images.
As for ARCH, uname
returns x86_64
instead of amd64
. It leads to error when building container.
As far as I understand, the build command is used only in drone pipeline to ensure that build is not broken and for local build and development. For these purposes these values can and should be hardcoded.
This is not a change that we want to accept. These command is to build container if it needs to be tested locally. One can easily override defaults for their target platform. I don't see any value in hardcoding these variables. Closing for now. Thanks a lot for contribution in any case. |
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Fixes #128
Proposed Changes
Description
Checklist
Unreleased
section of CHANGELOG.