Skip to content

Commit

Permalink
tag container images with snapshot information (elastic#9063)
Browse files Browse the repository at this point in the history
  • Loading branch information
graphaelli authored Nov 13, 2018
1 parent 9294384 commit 1dd4fbf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dev-tools/mage/dockerbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 1dd4fbf

Please sign in to comment.