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

Enable setting environment variables in .ko.yaml #419

Merged
merged 2 commits into from
Aug 23, 2021

Conversation

halvards
Copy link
Collaborator

Matches the GoReleaser format.

Related: #340

@google-cla google-cla bot added the cla: yes label Aug 18, 2021
README.md Outdated
@@ -144,6 +146,8 @@ builds:
- -X main.version={{.Env.VERSION}}
- id: bar
main: ./foobar/bar/main.go
env:
- CGO_ENABLED=1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't tend to support cgo well, can we use another example here instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, changed to GOCACHE.

@halvards
Copy link
Collaborator Author

Should I commit the changes in doc/ too? The only changes are the dates in the Auto generated comments on each file, there are no changes to the content.

halvards added a commit to halvards/ko that referenced this pull request Aug 19, 2021
Enables programmatically overriding build configs when ko is
embedded in another tool.

Related: ko-build#340, ko-build#419
jonjohnsonjr
jonjohnsonjr previously approved these changes Aug 19, 2021
@jonjohnsonjr
Copy link
Collaborator

I think this just needs a rebase.

halvards added a commit to halvards/ko that referenced this pull request Aug 22, 2021
Enables programmatically overriding build configs when ko is
embedded in another tool.

Related: ko-build#340, ko-build#419
@halvards
Copy link
Collaborator Author

Rebased, but Travis CI complains about the s390x build. Other archs seem fine, and the other PR has the same problem.

@jonjohnsonjr
Copy link
Collaborator

Rebased, but Travis CI complains about the s390x build. Other archs seem fine, and the other PR has the same problem.

Frustrating :/ just going to merge this anyway but we should probably just drop travis.

@jonjohnsonjr jonjohnsonjr merged commit 9a256a4 into ko-build:main Aug 23, 2021
@halvards halvards deleted the config-env branch August 23, 2021 22:21
halvards added a commit to halvards/ko that referenced this pull request Aug 25, 2021
Enables programmatically overriding build configs when ko is
embedded in another tool.

Related: ko-build#340, ko-build#419
jonjohnsonjr pushed a commit that referenced this pull request Aug 26, 2021
* Set build config via BuildOptions

Enables programmatically overriding build configs when ko is
embedded in another tool.

Related: #340, #419

* Use local registry for base images in unit tests

Tests create a local registry (using ggcr) with a dummy base image. This
speeds up tests, since they don't need to hit gcr.io to fetch the
default distroless base image.

* Update function comment to refer to random image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants