Merged by openshift-bot
OpenShift Bot authored on 2016/10/27 05:50:09... | ... |
@@ -127,30 +127,21 @@ func DumpImageStreams(oc *CLI) { |
127 | 127 |
} |
128 | 128 |
|
129 | 129 |
func DumpNamedBuildLogs(buildName string, oc *CLI) { |
130 |
- bldOuput, err := oc.Run("logs").Args("-f", "build/"+buildName).Output() |
|
130 |
+ buildOuput, err := oc.Run("logs").Args("-f", "build/"+buildName, "--timestamps").Output() |
|
131 | 131 |
if err == nil { |
132 |
- fmt.Fprintf(g.GinkgoWriter, "\n\n build logs for %s: %s\n\n", buildName, bldOuput) |
|
132 |
+ fmt.Fprintf(g.GinkgoWriter, "\n\n build logs for %s: %s\n\n", buildName, buildOuput) |
|
133 | 133 |
} else { |
134 |
- fmt.Fprintf(g.GinkgoWriter, "\n\n got error on bld logs for %s: %+v\n\n", buildName, err) |
|
134 |
+ fmt.Fprintf(g.GinkgoWriter, "\n\n got error on build logs for %s: %+v\n\n", buildName, err) |
|
135 | 135 |
} |
136 | 136 |
} |
137 | 137 |
|
138 | 138 |
// DumpBuildLogs will dump the latest build logs for a BuildConfig for debug purposes |
139 | 139 |
func DumpBuildLogs(bc string, oc *CLI) { |
140 |
- bldOuput, err := oc.Run("logs").Args("-f", "bc/"+bc).Output() |
|
140 |
+ buildOuput, err := oc.Run("logs").Args("-f", "bc/"+bc, "--timestamps").Output() |
|
141 | 141 |
if err == nil { |
142 |
- fmt.Fprintf(g.GinkgoWriter, "\n\n build logs : %s\n\n", bldOuput) |
|
142 |
+ fmt.Fprintf(g.GinkgoWriter, "\n\n build logs : %s\n\n", buildOuput) |
|
143 | 143 |
} else { |
144 |
- fmt.Fprintf(g.GinkgoWriter, "\n\n got error on bld logs %+v\n\n", err) |
|
145 |
- |
|
146 |
- // there have been some issues with oc new-app where build don't appear to even be started; |
|
147 |
- // temporarily trying a start-build to see what is up |
|
148 |
- /*err = oc.Run("start-build").Args(bc).Execute() |
|
149 |
- if err != nil { |
|
150 |
- fmt.Fprintf(g.GinkgoWriter, "\n GGM start-build error for %s is %+v", bc, err) |
|
151 |
- } else { |
|
152 |
- fmt.Fprintf(g.GinkgoWriter, "\n GGM start build after new-app hiccup for %s worked\n", bc) |
|
153 |
- }*/ |
|
144 |
+ fmt.Fprintf(g.GinkgoWriter, "\n\n got error on build logs %+v\n\n", err) |
|
154 | 145 |
} |
155 | 146 |
|
156 | 147 |
// if we suspect that we are filling up the registry file system, call ExamineDiskUsage / ExaminePodDiskUsage |
... | ... |
@@ -200,15 +191,6 @@ func DumpDeploymentLogs(dc string, oc *CLI) { |
200 | 200 |
} else { |
201 | 201 |
fmt.Fprintf(g.GinkgoWriter, "\n\n got error on get pods: %v\n\n", err) |
202 | 202 |
} |
203 |
- // temporary debug around deployments not even getting started with oc new-app |
|
204 |
- /*out, err = oc.Run("deploy").Args(dc, "--latest").Output() |
|
205 |
- if err == nil { |
|
206 |
- fmt.Fprintf(g.GinkgoWriter, "\n\n debug oc test deploy for %s is OK\n", dc) |
|
207 |
- } else { |
|
208 |
- fmt.Fprintf(g.GinkgoWriter, "\n\n debug oc test deploy for %s got error %+v\n\n", dc, err) |
|
209 |
- }*/ |
|
210 |
- // temporary debug dump the local images for the neutered, deploy doesn't even start scenario |
|
211 |
- |
|
212 | 203 |
} |
213 | 204 |
|
214 | 205 |
// ExamineDiskUsage will dump df output on the testing system; leveraging this as part of diagnosing |
... | ... |
@@ -344,11 +326,11 @@ func (t *BuildResult) DumpLogs() { |
344 | 344 |
|
345 | 345 |
fmt.Fprintf(g.GinkgoWriter, "\n** Build Logs:\n") |
346 | 346 |
|
347 |
- bldOuput, err := t.Logs() |
|
347 |
+ buildOuput, err := t.Logs() |
|
348 | 348 |
if err != nil { |
349 | 349 |
fmt.Fprintf(g.GinkgoWriter, "Error during log retrieval: %+v\n", err) |
350 | 350 |
} else { |
351 |
- fmt.Fprintf(g.GinkgoWriter, "%s\n", bldOuput) |
|
351 |
+ fmt.Fprintf(g.GinkgoWriter, "%s\n", buildOuput) |
|
352 | 352 |
} |
353 | 353 |
|
354 | 354 |
fmt.Fprintf(g.GinkgoWriter, "\n\n") |
... | ... |
@@ -367,12 +349,12 @@ func (t *BuildResult) Logs() (string, error) { |
367 | 367 |
return "", fmt.Errorf("Not enough information to retrieve logs for %#v", *t) |
368 | 368 |
} |
369 | 369 |
|
370 |
- bldOuput, err := t.oc.Run("logs").Args("-f", t.BuildPath).Output() |
|
370 |
+ buildOuput, err := t.oc.Run("logs").Args("-f", t.BuildPath, "--timestamps").Output() |
|
371 | 371 |
if err != nil { |
372 | 372 |
return "", fmt.Errorf("Error retieving logs for %#v: %v", *t, err) |
373 | 373 |
} |
374 | 374 |
|
375 |
- return bldOuput, nil |
|
375 |
+ return buildOuput, nil |
|
376 | 376 |
} |
377 | 377 |
|
378 | 378 |
// Dumps logs and triggers a Ginkgo assertion if the build did NOT succeed. |