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

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

@linzhp linzhp requested a review from uhthomas April 15, 2022 16:24
@@ -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 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.

2 participants