-
Notifications
You must be signed in to change notification settings - Fork 88
Use git branch names as tags for docker images #70
Conversation
@@ -47,12 +45,12 @@ ENV PATH=/opt/rocker/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin | |||
|
|||
CMD ["/opt/rocker/bin/rocker"] | |||
|
|||
PUSH dockerhub.grammarly.io/rocker:{{ .Version }} | |||
{{ if $version }} |
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.
I think we should do a branch PUSH
always, without any conditions. Branch can be none
or no-branch
by default.
PUSH with version can be with condition and be pushed to rocker:$version
but not rocker:$branch-$version
. Because if you know a particular version, you don't care about a branch.
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.
Also, this condition does not make sense because you always assign a value to the $version
variable.
I think that having branch name as part of tag is quite useful. You can just grep by branch name to see all builds from particular branch. e.g. |
I thought we decided to not include version for branch-named images... |
It's difficult not to include. What if someone would like to roll back to an older master version for some reason? Or just check the previous build in branch for debugging purpose? |
Will push to rocker:<branch-name> always. Will push to rocker:<version> only in case when we version is defined and master is our current branch.
Use git branch names as tags for docker images
No description provided.