@@ -462,22 +462,25 @@ var _ = g.Describe("[Feature:Builds][Slow] openshift pipeline build", func() {
462
462
err := oc .Run ("create" ).Args ("-f" , clientPluginPipelinePath ).Execute ()
463
463
o .Expect (err ).NotTo (o .HaveOccurred ())
464
464
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 ()
477
479
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
+ }
481
484
})
482
485
})
483
486
0 commit comments