diff --git a/cli/COVERAGE b/cli/COVERAGE index 676df72173..f3c67fcf74 100644 --- a/cli/COVERAGE +++ b/cli/COVERAGE @@ -1 +1 @@ -22.10 \ No newline at end of file +22.14 \ No newline at end of file diff --git a/cli/pkg/artifact_builder/COVERAGE b/cli/pkg/artifact_builder/COVERAGE index 25cb04c2a0..3327ed08f8 100644 --- a/cli/pkg/artifact_builder/COVERAGE +++ b/cli/pkg/artifact_builder/COVERAGE @@ -1 +1 @@ -53.5 \ No newline at end of file +53.6 \ No newline at end of file diff --git a/cli/pkg/artifact_builder/artifact_builder.go b/cli/pkg/artifact_builder/artifact_builder.go index ac9881ffe7..890a644800 100644 --- a/cli/pkg/artifact_builder/artifact_builder.go +++ b/cli/pkg/artifact_builder/artifact_builder.go @@ -354,6 +354,12 @@ func (ab ArtifactBuilder) push(ctx context.Context, tags []string, servicesImage } image := servicesImage[serviceName] + parts := strings.Split(image, ":") + + if len(parts) != 2 || len(strings.TrimSpace(parts[0])) == 0 { + return errors.Errorf("invalid image reference for service '%s': '%s'. Make sure docker-compose file has the image field specified for this service.", serviceName, image) + } + for _, currentTag := range tags { // re-tag image cmd := exec.CommandContext(ctx, "docker", "tag", image, fmt.Sprintf("%s:%s", registry.URL, currentTag))