Skip to content

Commit

Permalink
Revert "[elastic-agent] Use -complete in docker image name, not tag (#…
Browse files Browse the repository at this point in the history
…27399)"

This reverts commit 954a250.
  • Loading branch information
mdelapenya committed Oct 19, 2021
1 parent 08c6c20 commit 467f58f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions dev-tools/mage/dockerbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,18 +195,17 @@ func (b *dockerBuilder) expandDockerfile(templatesDir string, data map[string]in
}

func (b *dockerBuilder) dockerBuild(variant string) (string, error) {
imageName := b.imageName
tag := fmt.Sprintf("%s:%s", b.imageName, b.Version)
if variant != "" {
imageName = fmt.Sprintf("%s-%s", imageName, variant)
tag = fmt.Sprintf("%s-%s", tag, variant)
}
taggedImageName := fmt.Sprintf("%s:%s", imageName, b.Version)
if b.Snapshot {
taggedImageName = taggedImageName + "-SNAPSHOT"
tag = tag + "-SNAPSHOT"
}
if repository, _ := b.ExtraVars["repository"]; repository != "" {
taggedImageName = fmt.Sprintf("%s/%s", repository, taggedImageName)
tag = fmt.Sprintf("%s/%s", repository, tag)
}
return taggedImageName, sh.Run("docker", "build", "-t", taggedImageName, b.buildDir)
return tag, sh.Run("docker", "build", "-t", tag, b.buildDir)
}

func (b *dockerBuilder) dockerSave(tag string) error {
Expand Down

0 comments on commit 467f58f

Please sign in to comment.