How does everyone here handle Docker image promoti...
# general
d
How does everyone here handle Docker image promotion in a deployment? Pushing the image is fine, but say you want to use a commit hash/pants.hash. How do you assemble all of the correct hash values?
h
@curved-television-6568 thoughts?
c
Yea well, in our case at day job, we have pretty much and complicated custom tooling for tracking built releases and where/how to deploy them, so no easy answer I'm afraid.
d
ok thanks. That's kind of what I assumed, but wasn't sure if there were any built ins that helped with that
h
What kind of functionality did you have in mind? I have this change pending which extracts version info from git tags for use downstream. It's not directly usable for Docker at the moment, and it's less about hashes and more about extracting semvers from tags. But since my head is in the "deriving versions from VCS" space at the moment, would love to hear what kind of workflow you're looking to implement.
d
ah interesting. We wrote a plugin that will get all of the pants.hashes from all container images. That way when we tag the image with the pants.hash we can later on pass the correct versions to helm for deployment
I'll look at the PR
q
I am working on this with @dazzling-petabyte-91122 - basically the workflow we are looking for is to get a deterministic hash for each target I was hoping that we could get the output in
list
or
peek
goals - was hoping it would be possible to get quickly without running a full build on the repo The idea is that we could upload artifacts using the deterministic hash. Then for deployment of the repo, we could simply list all of the hashes out and know which artifacts to run In the case of
docker_image
targets there is a
pants.hash
variable exposed in the build context, but I do believe that is specefic to the
docker_image
target. We were able to write a plugin to list that variable out so I think we're good But it could be nice to have a deterministic hash for all targets if someone was not using
docker
for example