Skip to content

Commit

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

Previously `complete` images were named `elastic-agent:8.0.0-complete`,
this changes them to `elastic-agent-complete:8.0.0` to be compatible
with our release process.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
andrewvc and mergify[bot] committed Aug 16, 2021
1 parent b906aab commit 954a250
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dev-tools/mage/dockerbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,18 @@ func (b *dockerBuilder) expandDockerfile(templatesDir string, data map[string]in
}

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

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

0 comments on commit 954a250

Please sign in to comment.