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

include source repo, revision and go package version as build-args #3932

Merged
merged 1 commit into from
Jun 12, 2023

Conversation

deitch
Copy link
Collaborator

@deitch deitch commented Jun 8, 2023

- What I did

Added some fixed default build-args that linuxkit pkg build passes to the docker build. These are

  • SOURCE
  • REVISION
  • GOPKGVERSION

They are in the docs as well.

These are set only if the user does not override them in build.yaml.

Also added a test, of course.

Note that I picked build-args that are tied to the filesystem and commit. Thus, they do not interfere with reproducible builds.

I did consider adding the username and host that built, but wasn't sure if that violated our "reproducible always" requirement.

- How I did it

Changes to git.go and build.go

- How to verify it

CI. I added tests. And I tested manually.

- Description for the changelog

Pass build-context information to package builds via --builg-arg

- Note

I have a follow on for several packages to take advantage of this.

Signed-off-by: Avi Deitcher <avi@deitcher.net>
@deitch deitch merged commit aab61a1 into linuxkit:master Jun 12, 2023
22 checks passed
@deitch deitch deleted the build-args-with-versions branch June 12, 2023 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant