Merge "Adds conditional steps for reports"
authormadavi <jm00553988@techmahindra.com>
Wed, 4 Sep 2019 15:03:47 +0000 (17:03 +0200)
committerGerrit Code Review <root@osm.etsi.org>
Wed, 4 Sep 2019 15:03:47 +0000 (17:03 +0200)
jenkins/ci-pipelines/ci_stage_2.groovy

index d0e9d9d..ddbd80a 100644 (file)
@@ -1,7 +1,7 @@
 /* Copyright 2017 Sandvine
  *
  * All Rights Reserved.
- * 
+ *
  *   Licensed under the Apache License, Version 2.0 (the "License"); you may
  *   not use this file except in compliance with the License. You may obtain
  *   a copy of the License at
@@ -55,6 +55,12 @@ def ci_pipeline(mdg,url_prefix,project,branch,refspec,revision,do_stage_3,artifa
     withDockerContainer(image: "${container_name}", args: docker_args) {
         stage('Test') {
             sh 'devops-stages/stage-test.sh'
+            if (fileExists('coverage.xml')) {
+                cobertura coberturaReportFile: 'coverage.xml'
+            }
+            if (fileExists('nosetests.xml')) {
+                junit 'nosetests.xml'
+            }
         }
         stage('Build') {
             sh(returnStdout:true,  script: 'devops-stages/stage-build.sh').trim()