Skip to content

Commit f28be5d

Browse files
Merge pull request #18070 from gabemontero/tweak-client-plugin-ext-test
Automatic merge from submit-queue (batch tested with PRs 18075, 17725, 16766, 18070, 18113). additional test for jenkins client plugin @openshift/sig-developer-experience step 5 (last step) from openshift/jenkins-client-plugin#107
2 parents aecc074 + ecb5a79 commit f28be5d

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

test/extended/builds/pipeline.go

+18-15
Original file line numberDiff line numberDiff line change
@@ -462,22 +462,25 @@ var _ = g.Describe("[Feature:Builds][Slow] openshift pipeline build", func() {
462462
err := oc.Run("create").Args("-f", clientPluginPipelinePath).Execute()
463463
o.Expect(err).NotTo(o.HaveOccurred())
464464

465-
// start the build
466-
g.By("starting the pipeline build and waiting for it to complete")
467-
br, err := exutil.StartBuildAndWait(oc, "sample-pipeline-openshift-client-plugin")
468-
debugAnyJenkinsFailure(br, oc.Namespace()+"-sample-pipeline-openshift-client-plugin", oc, true)
469-
if err != nil || !br.BuildSuccess {
470-
exutil.DumpBuilds(oc)
471-
exutil.DumpBuildLogs("ruby", oc)
472-
exutil.DumpDeploymentLogs("mongodb", 1, oc)
473-
exutil.DumpDeploymentLogs("jenkins-second-deployment", 1, oc)
474-
exutil.DumpDeploymentLogs("jenkins-second-deployment", 2, oc)
475-
}
476-
br.AssertSuccess()
465+
// start the build - we run it twice because our sample pipeline exercises different paths of the client
466+
// plugin based on whether certain resources already exist or not
467+
for i := 0; i < 2; i++ {
468+
g.By(fmt.Sprintf("starting the pipeline build and waiting for it to complete, pass: %d", i))
469+
br, err := exutil.StartBuildAndWait(oc, "sample-pipeline-openshift-client-plugin")
470+
debugAnyJenkinsFailure(br, oc.Namespace()+"-sample-pipeline-openshift-client-plugin", oc, true)
471+
if err != nil || !br.BuildSuccess {
472+
exutil.DumpBuilds(oc)
473+
exutil.DumpBuildLogs("ruby", oc)
474+
exutil.DumpDeploymentLogs("mongodb", 1, oc)
475+
exutil.DumpDeploymentLogs("jenkins-second-deployment", 1, oc)
476+
exutil.DumpDeploymentLogs("jenkins-second-deployment", 2, oc)
477+
}
478+
br.AssertSuccess()
477479

478-
g.By("get build console logs and see if succeeded")
479-
_, err = j.GetJobConsoleLogsAndMatchViaBuildResult(br, "Finished: SUCCESS")
480-
o.Expect(err).NotTo(o.HaveOccurred())
480+
g.By("get build console logs and see if succeeded")
481+
_, err = j.GetJobConsoleLogsAndMatchViaBuildResult(br, "Finished: SUCCESS")
482+
o.Expect(err).NotTo(o.HaveOccurred())
483+
}
481484
})
482485
})
483486

0 commit comments

Comments
 (0)