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

[1340] Disable git labels if BUILDX_GIT_LABELS is not 1 or full #1341

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

dgageot
Copy link
Member

@dgageot dgageot commented Oct 3, 2022

This is to make sure that BUILDX_GIT_LABELS= docker buildx build ... will not set the git labels.

Fixes #1340

Signed-off-by: David Gageot [email protected]

Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

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

LGTM thanks, PTAL @cdupuis

@cdupuis
Copy link
Contributor

cdupuis commented Oct 4, 2022

LGTM. Thanks for the improvement.

@crazy-max crazy-max merged commit 3a5741f into docker:master Oct 4, 2022
v, ok := os.LookupEnv("BUILDX_GIT_LABELS")
if !ok || contextPath == "" {
v := os.Getenv("BUILDX_GIT_LABELS")
if (v != "1" && v != "full") || contextPath == "" {
Copy link
Member

Choose a reason for hiding this comment

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

Could we just do strconv.ParseBool in here like we do in some other places?

@cdupuis Do you need this string "full" for something?

Copy link
Contributor

Choose a reason for hiding this comment

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

Setting the env var to full will include the repository url. We did this so that there's a way to not leak repository names but still include commit sha.

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.

BUILDX_GIT_LABELS= or BUILDX_GIT_LABELS=0 don't deactivate git labels
4 participants