@@ -55,8 +55,9 @@ func debugAnyJenkinsFailure(br *exutil.BuildResult, name string, oc *exutil.CLI,
55
55
var _ = g .Describe ("[Feature:Builds][Slow] openshift pipeline build" , func () {
56
56
defer g .GinkgoRecover ()
57
57
var (
58
- jenkinsTemplatePath = exutil .FixturePath (".." , ".." , "examples" , "jenkins" , "jenkins-ephemeral-template.json" )
59
- mavenSlavePipelinePath = exutil .FixturePath (".." , ".." , "examples" , "jenkins" , "pipeline" , "maven-pipeline.yaml" )
58
+ jenkinsTemplatePath = exutil .FixturePath (".." , ".." , "examples" , "jenkins" , "jenkins-ephemeral-template.json" )
59
+ mavenSlavePipelinePath = exutil .FixturePath (".." , ".." , "examples" , "jenkins" , "pipeline" , "maven-pipeline.yaml" )
60
+ mavenSlaveGradlePipelinePath = exutil .FixturePath ("testdata" , "builds" , "gradle-pipeline.yaml" )
60
61
//orchestrationPipelinePath = exutil.FixturePath("..", "..", "examples", "jenkins", "pipeline", "mapsapp-pipeline.yaml")
61
62
blueGreenPipelinePath = exutil .FixturePath (".." , ".." , "examples" , "jenkins" , "pipeline" , "bluegreen-pipeline.yaml" )
62
63
clientPluginPipelinePath = exutil .FixturePath (".." , ".." , "examples" , "jenkins" , "pipeline" , "openshift-client-plugin-pipeline.yaml" )
@@ -142,7 +143,7 @@ var _ = g.Describe("[Feature:Builds][Slow] openshift pipeline build", func() {
142
143
}
143
144
)
144
145
145
- g .Context ("Pipeline with maven slave" , func () {
146
+ g .Context ("Pipelines with maven slave" , func () {
146
147
g .BeforeEach (func () {
147
148
setupJenkins ()
148
149
@@ -184,7 +185,7 @@ var _ = g.Describe("[Feature:Builds][Slow] openshift pipeline build", func() {
184
185
}
185
186
})
186
187
187
- g .It ("should build and complete successfully" , func () {
188
+ g .It ("should build a maven project and complete successfully" , func () {
188
189
// instantiate the template
189
190
g .By (fmt .Sprintf ("calling oc new-app -f %q" , mavenSlavePipelinePath ))
190
191
err := oc .Run ("new-app" ).Args ("-f" , mavenSlavePipelinePath ).Execute ()
@@ -207,6 +208,22 @@ var _ = g.Describe("[Feature:Builds][Slow] openshift pipeline build", func() {
207
208
_ , err = exutil .GetEndpointAddress (oc , "openshift-jee-sample" )
208
209
o .Expect (err ).NotTo (o .HaveOccurred ())
209
210
})
211
+
212
+ g .It ("should build a gradle project and complete successfully" , func () {
213
+ err := oc .Run ("create" ).Args ("-f" , mavenSlaveGradlePipelinePath ).Execute ()
214
+ o .Expect (err ).NotTo (o .HaveOccurred ())
215
+
216
+ // start the build
217
+ g .By ("waiting for the build to complete" )
218
+ br := & exutil.BuildResult {Oc : oc , BuildName : "gradle-1" }
219
+ err = exutil .WaitForBuildResult (oc .BuildClient ().Build ().Builds (oc .Namespace ()), br )
220
+ if err != nil || ! br .BuildSuccess {
221
+ exutil .DumpBuilds (oc )
222
+ exutil .DumpPodLogsStartingWith ("maven" , oc )
223
+ }
224
+ debugAnyJenkinsFailure (br , oc .Namespace ()+ "-gradle-pipeline" , oc , true )
225
+ br .AssertSuccess ()
226
+ })
210
227
})
211
228
212
229
g .Context ("Pipeline using config map slave" , func () {
0 commit comments