Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Support credential helpers in container_pull #2034

Merged
merged 6 commits into from
Apr 19, 2022

Conversation

linzhp
Copy link
Collaborator

@linzhp linzhp commented Mar 1, 2022

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Currently, all credential helpers are required to be in system PATH before calling container_pull with authentication. This is not portable.

Issue Number: N/A

What is the new behavior?

toolchain_config and container_pull can take a list of credential helpers as labels, so we can check them into a repository, without installing them on the system or setting system PATH

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@@ -64,6 +64,13 @@ _container_pull_attrs = {
""",
mandatory = False,
),
"cred_helpers": attr.label_list(
doc = """Labels to a list of credential helpers binaries that are configured in `docker_client_config`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit:

-helpers binaries
+helper binaries

@uhthomas
Copy link
Collaborator

Changes look great, thanks! This will be useful for our organisation also :)

@linzhp linzhp merged commit 6ea707b into bazelbuild:master Apr 19, 2022
@linzhp linzhp deleted the cred_helpers branch April 19, 2022 17:07
St0rmingBr4in pushed a commit to St0rmingBr4in/rules_docker that referenced this pull request Oct 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants