From 1dd4fbf559e515c9141c1cb0308742a9efb10cf3 Mon Sep 17 00:00:00 2001 From: Gil Raphaelli Date: Tue, 13 Nov 2018 17:06:16 -0500 Subject: [PATCH] tag container images with snapshot information (#9063) --- dev-tools/mage/dockerbuilder.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dev-tools/mage/dockerbuilder.go b/dev-tools/mage/dockerbuilder.go index d7c3cc147a7..24baefd1eaf 100644 --- a/dev-tools/mage/dockerbuilder.go +++ b/dev-tools/mage/dockerbuilder.go @@ -127,6 +127,10 @@ func (b *dockerBuilder) prepareBuild() error { func (b *dockerBuilder) dockerBuild() (string, error) { tag := fmt.Sprintf("%s:%s", b.Name, b.Version) + if b.Snapshot { + tag = tag + "-SNAPSHOT" + } + if repository, _ := b.ExtraVars["repository"]; repository != "" { tag = fmt.Sprintf("%s/%s", repository, tag) }