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

Add repository_file attribute to the container_pull rule #1618

Merged
merged 2 commits into from
Sep 11, 2020

Conversation

nlewo
Copy link
Contributor

@nlewo nlewo commented Sep 7, 2020

This attribute allows to set the repository value from a file as it is
already possible for the tag thanks to the tag_file attribute.

This attribute allows to set the repository value from a file as it is
already possible for the tag thanks to the tag_file attribute.
@nlewo nlewo changed the title Add repository_file attribute to the container_pull rule wip: add repository_file attribute to the container_pull rule Sep 7, 2020
@nlewo nlewo changed the title wip: add repository_file attribute to the container_pull rule Add repository_file attribute to the container_pull rule Sep 7, 2020
@nlewo
Copy link
Contributor Author

nlewo commented Sep 7, 2020

Note we always need to provide the repository attribute because it is mandatory. Since for most use cases the repository attribute should be sufficient, i think it would be better to preserve this behavior.
WDYT?

@smukherj1
Copy link
Collaborator

Seems reasonable to have repository_file given tag_file already exists. Feel free to update the pusher binary to implement this.

@nlewo
Copy link
Contributor Author

nlewo commented Sep 9, 2020

@smukherj1 What exactly should i implement in the pusher binary?
The repository_file (and tag_file) value is substituted by bash (in the generated bash script): the pusher takes as argument a string such as --dst=repository:$(cat ${RUNFILES}/tag), where $(cat ${RUNFILES}/tag) is evaluated by bash.

@smukherj1
Copy link
Collaborator

Apologies, I missed the cat.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nlewo, smukherj1

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

@smukherj1
Copy link
Collaborator

/gcbrun

@rbe-toolchains-pr-bot rbe-toolchains-pr-bot merged commit 47c5f07 into bazelbuild:master Sep 11, 2020
@nlewo
Copy link
Contributor Author

nlewo commented Sep 11, 2020

Thanks ;)

cgdolan pushed a commit to cgdolan/rules_docker that referenced this pull request Sep 13, 2020
jamiees2 pushed a commit to jamiees2/rules_docker that referenced this pull request Sep 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants