Any thoughts on best practices for creating unique...
# general
n
Any thoughts on best practices for creating unique docker tag values for use with immutable repositories? After some research (this article presents some key considerations), I'm thinking of running with something like •
<trimmed branch name>--<git short commit sha>--<github actions build attempt number>
for CI builds and •
<trimmed branch name>-<git short commit sha>--<timestamp>
for local builds Curious what others are doing, and if an opinionated version (if a starting point) could be added to the docs or a blog post.
c
n
Yes, that's pretty helpful. I think it would be enough for our project, but was trying to come up with a more generic version for the org which may have non-pants builds. Can push both of course.
c
ah, right. yea this one’s pretty specific 😅
n
Actually, now that I think of it,
{pants.hash}
is not useful for immutable rego, because if the github workflow runs again, it will try to push the same value which won't be allowed. I've got
"gitHash-{build_args.GIT_COMMIT}-buildId-{build_args.BUILD_ID}"
working for now.