Skip to content
This repository has been archived by the owner on Jul 16, 2018. It is now read-only.

Commit

Permalink
Merge pull request #602 from jstrachan/changes
Browse files Browse the repository at this point in the history
lets detect the new ConfigMap in jenkins namespace for the console URL
  • Loading branch information
jstrachan authored Oct 17, 2017
2 parents 4d59058 + d21b7cd commit d3006ba
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions cmds/e2e_env.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,28 +74,34 @@ func (p *e2eEnvFlags) runTest(f cmdutil.Factory) error {
if len(ns) == 0 {
return fmt.Errorf("No namespace is defined and no namespace specified!")
}
typeOfMaster := util.TypeOfMaster(c)

url := GetServiceURL(ns, "fabric8", c)
url := ""
spaceLink, err := c.ConfigMaps(ns).Get("fabric8-space-link")
if err == nil && spaceLink != nil && spaceLink.Data != nil{
url = spaceLink.Data["fabric8-console-url"]
}
if len(url) == 0 {
names, err := getNamespacesOrProjects(c, oc)
if err != nil {
return err
}
for _, name := range names {
url = GetServiceURL(name, "fabric8", c)
if len(url) > 0 {
break
}
}
url = GetServiceURL(ns, "fabric8", c)
if len(url) == 0 {
return fmt.Errorf("Could not find a service called fabric8 in any of these namespaces %v", names)
names, err := getNamespacesOrProjects(c, oc)
if err != nil {
return err
}
for _, name := range names {
url = GetServiceURL(name, "fabric8", c)
if len(url) > 0 {
break
}
}
if len(url) == 0 {
return fmt.Errorf("Could not find a service called fabric8 in any of these namespaces %v", names)
}
}
}



platform := "osio"
typeOfMaster := util.TypeOfMaster(c)
if typeOfMaster == util.Kubernetes {
platform = "fabric8-kubernetes"
} else {
Expand Down

0 comments on commit d3006ba

Please sign in to comment.