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

Add git to image build docker step #4534

Merged
merged 1 commit into from Mar 24, 2022

Conversation

KnVerey
Copy link
Contributor

@KnVerey KnVerey commented Mar 24, 2022

Our cloud build image uploader started failing a week ago with an error about git not being available in the build container. It never has been, so I'm not sure how it worked before if git was required. But I can reproduce the failure locally, and adding git indeed fixes the problem.

My guess as to the cause of this is that we are not controlling the version of the Go alpine image we're building in, and it updated to use go 1.18. With Go 1.18, the build seems to default to trying to populate [BuildInfo](https://pkg.go.dev/debug/buildinfo@master#BuildInfo) including VCS information. The error I got locally is more informative:

#12 13.23 error obtaining VCS status: exec: "git": executable file not found in $PATH
#12 13.23 	Use -buildvcs=false to disable VCS stamping.

We aren't currently/yet using BuildInfo regardless, and if we do we'll want to make sure the VCS information it gets this way is correct.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 24, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: KnVerey

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 24, 2022
@natasha41575 natasha41575 merged commit de6b978 into kubernetes-sigs:master Mar 24, 2022
@KnVerey KnVerey deleted the add-git-to-builder branch March 24, 2022 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants