Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into gh-fix-557
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-stokes authored Mar 30, 2021
2 parents db79d42 + 51339fa commit 2e27de0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion cli/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package cmd

import (
"context"
"os"
"strings"

"github.com/elastic/e2e-testing/cli/config"
Expand Down Expand Up @@ -78,7 +79,11 @@ func buildRunProfileCommand(key string, profile config.Profile) *cobra.Command {
return &cobra.Command{
Use: key,
Short: `Runs the ` + profile.Name + ` profile`,
Long: `Runs the ` + profile.Name + ` profile, spinning up the Services that compound it`,
Long: `Runs the ` + profile.Name + ` profile, spinning up the Services that compound it
Example:
go run main.go run profile fleet -s elastic-agent:8.0.0-SNAPSHOT
`,
Run: func(cmd *cobra.Command, args []string) {
serviceManager := services.NewServiceManager()

Expand All @@ -99,6 +104,13 @@ func buildRunProfileCommand(key string, profile config.Profile) *cobra.Command {

for _, srv := range services {
arr := strings.Split(srv, ":")
if len(arr) != 2 {
log.WithFields(log.Fields{
"profile": key,
"services": servicesToRun,
}).Error("Unable to determine the <image>:<tag>, please make sure to use a known docker tag format, eg. `elastic-agent:8.0.0-SNAPSHOT`")
os.Exit(1)
}
image := arr[0]
tag := arr[1]

Expand Down

0 comments on commit 2e27de0

Please sign in to comment.