Skip to content

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