Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Use git branch names as tags for docker images #70

Merged
merged 4 commits into from
Feb 3, 2016
Merged

Conversation

romank87
Copy link
Contributor

@romank87 romank87 commented Feb 1, 2016

No description provided.

@@ -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 }}
Copy link
Contributor

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.

Copy link
Contributor

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.

@romank87
Copy link
Contributor Author

romank87 commented Feb 1, 2016

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. curl https://dockerhub.grammarly.io/v2/rocker/tags/list 2>/dev/null | python -m json.tool | grep f-use-branch-names
Not sure whether it could be required very often but approach itself is very handy as for me

@ybogdanov
Copy link
Contributor

I thought we decided to not include version for branch-named images...

@romank87
Copy link
Contributor Author

romank87 commented Feb 1, 2016

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?
Anyway, there are a lot of things to consider here. Let discuss it tomorrow all together.

 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.
romank87 added a commit that referenced this pull request Feb 3, 2016
Use git branch names as tags for docker images
@romank87 romank87 merged commit 6425f6e into dev Feb 3, 2016
@romank87 romank87 added this to the 1.1.1 milestone Feb 3, 2016
@ybogdanov ybogdanov deleted the f-use-branch-names branch July 25, 2016 13:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants