X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_2.groovy;h=c433c14422819959df42a835fb1c8a443aa7fe8b;hb=7cc9f8072b5a12a827138c522ea0ff7d13c2324c;hp=76201111402b84211127573e5552152446b9923c;hpb=e609a968bf8054d76196781a4bd80e679c6184dc;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_stage_2.groovy b/jenkins/ci-pipelines/ci_stage_2.groovy index 76201111..c433c144 100644 --- a/jenkins/ci-pipelines/ci_stage_2.groovy +++ b/jenkins/ci-pipelines/ci_stage_2.groovy @@ -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 @@ -39,7 +39,12 @@ def ci_pipeline(mdg,url_prefix,project,branch,refspec,revision,do_stage_3,artifa } stage('License Scan') { + if (!JOB_NAME.contains('merge')) { sh "devops/tools/license_scan.sh" + } + else { + println("skip the scan for merge") + } } container_name = "${project}-${branch}".toLowerCase() @@ -55,15 +60,22 @@ 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() } - } - - stage('Archive') { - sh(returnStdout:true, script: 'devops-stages/stage-archive.sh').trim() - ci_helper.archive(artifactory_server,mdg,branch,'untested') + stage('Archive') { + sh "mkdir -p changelog" + sh "devops/tools/generatechangelog-pipeline.sh > changelog/changelog-${mdg}.html" + sh(returnStdout:true, script: 'devops-stages/stage-archive.sh').trim() + ci_helper.archive(artifactory_server,mdg,branch,'untested') + } } if ( do_stage_3 ) {