-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add tagPolicy: gitCommit: variant: Branches #6989
Comments
As an alternative approach, perhaps the set of "skaffold created special env vars" could be expanded to include git branch, git commit, etc: https://skaffold.dev/docs/environment/templating/ This would allow very nice control of git related tagging (including composite tags) using the |
@snickell thanks for opening up this issue, I don't know that this will be prioritized by the team but we're always open to PRs :) |
I'd be up to implement a PR if there was Skaffold team consensus that (at least in principal) this was a desirable feature |
I'd say go for it 👍 |
See #7006 for a PR that implements the proposal here |
Sorry for the extremely late bump, but is there a way to specify a specific branch? Like if you always want to get the latest commit of "release"? |
Since #6904 has been merged,
cacheFrom
will automatically munge an not-explicitly-tagged image name to append the current tagPolicy. This makes it potentially very useful for easy layer-build-caching of dev branches..... if the gitCommit tagPolicy permitted a Branch variant.In a dev context when building large docker build on a non-local machine relying on
cacheFrom
pulls rather than a local build cache, image tags are important for exporting and importing the most-relevant-to-current build cache, and git tags are generally not relevant.I would propose that:
behave just like
variant: 'Tags'
, but will check if the current commit is part of a branch, and use that for the image tag, rather than using the git tag.The text was updated successfully, but these errors were encountered: