-
Notifications
You must be signed in to change notification settings - Fork 135
feat: support stamping repository tags for images #423
Conversation
Adds support for using stamp variables for the repository tag so that it will resolve the repository name and tag prior to pushing the container to the repository. It now works similiar to the docker_rules `push_container` rule. ```python k8s_object( name = "image-stamping", # K8s deployment template wtih a stamping variable to replace template = ":deployment.yaml", # Build images with the same container images = { "index.docker.io/parsec86/{REPOSITORY}:{STABLE_GIT_COMMIT}": "//examples/imagestamping/go:go-container", } ) ``` >**Note** - Stamping only effects the resolved image name that is pushed to the container registry. The container digest will still be used inside your resolved template since the digest is immutable.
Hi @LanceEa. Thanks for your PR. I'm waiting for a bazelbuild member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@nlopezgi - This should address #387 that @codesuki was describing. I'm new to Bazel so let me know if there is anything I missed. Also, I wasn't sure on the examples folder if I should use gcr registry or not. So, for the time being I just use my personal repo for the example. Let me know how to best proceed and I can make that change. Thanks, |
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for sending this PR!
Change looks really good overall, a few nits, kicked off tests but should be good to submit once addressed.
Cleaned up the PR based on your feedback. Let me know if you need me to squash the commits or update the commit messages at all. Thanks, |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: LanceEa, nlopezgi 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 |
This addresses issue #378
Adds support for using stamp variables for the repository tag so that it will resolve the repository name and tag prior to pushing the container to the repository. It now works similar to the docker_rules
push_container
rule.