From: madavi Date: Tue, 10 Sep 2019 09:32:34 +0000 (+0200) Subject: Merge "RO, NBI, LCM and osmclient: Update pip to latest version" X-Git-Tag: v7.0.0rc1~69 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=d3dd343665385d6f6ce7d0b37950857b87b5bc09;hp=bfb7790d10dfc34c17976c8e60372543af33a618;p=osm%2Fdevops.git Merge "RO, NBI, LCM and osmclient: Update pip to latest version" --- diff --git a/Jenkinsfile b/Jenkinsfile index 9d7ca879..56a0830f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,20 @@ +/* Copyright 2019 ETSI + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + properties([ parameters([ string(defaultValue: env.BRANCH_NAME, description: '', name: 'GERRIT_BRANCH'), @@ -13,6 +30,10 @@ properties([ def devops_checkout() { dir('devops') { git url: "${PROJECT_URL_PREFIX}/osm/devops", branch: params.GERRIT_BRANCH + sh "git fetch origin ${params.GERRIT_REFSPEC}" + if (params.GERRIT_PATCHSET_REVISION.size() > 0 ) { + sh "git checkout -f ${params.GERRIT_PATCHSET_REVISION}" + } } } diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index 35c8706b..be160d65 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -630,7 +630,7 @@ function install_docker_compose() { function install_juju() { echo "Installing juju" - sudo snap install juju --classic + sudo snap install juju --classic --channel=2.5/stable [ -z "$INSTALL_NOLXD" ] && sudo dpkg-reconfigure -p medium lxd echo "Finished installation of juju" return 0 diff --git a/jenkins/ci-pipelines/ci_stage_2.groovy b/jenkins/ci-pipelines/ci_stage_2.groovy index d0e9d9dc..ddbd80aa 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 @@ -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() diff --git a/tools/license_scan.sh b/tools/license_scan.sh index 2c5fb4a7..71d283fb 100755 --- a/tools/license_scan.sh +++ b/tools/license_scan.sh @@ -18,7 +18,7 @@ # Change log: # 1. Bug 722 : Jayant Madavi : JM00553988@techmahindra.com : Enhancement to use new fossology server. Had to change the variable name at # couple of places, while scanning the variable name was adding curl as a license. # 2. Bug 542 : Jayant Madavi, Mrityunjay Yadav : JM00553988@techmahindra.com : 24-jul-2019 : Enhancement to raise exit in case files modified or added does # not contain license. -# 3. +# 3. Bug 542 : Jayant Madavi, Mrityunjay Yadav : JM00553988@techmahindra.com :add exception list. for now as inLine. later need to create a variable for exception_list echo GERRIT BRANCH is $GERRIT_BRANCH dpkg -l wget &>/dev/null ||sudo apt-get install -y wget @@ -29,12 +29,12 @@ dpkg -l curl &>/dev/null ||sudo apt-get install -y curl apache=0 nolicense=0 other=0 - +exception_list="':(exclude)*.pdf' ':(exclude)*.png' ':(exclude)*.jpeg' ':(exclude)*.jpg' ':(exclude)*.gif' ':(exclude)*.json'" git fetch RE="FATAL: your file did not get passed through" -for file in $(git diff --name-only origin/$GERRIT_BRANCH); do +for file in $(echo ${exception_list} | xargs git diff --name-only origin/$GERRIT_BRANCH -- . ); do if [ -f $file ]; then if [ -s $file ]; then licnse=$(curl -s -X POST -H 'Accept: text' -H 'Cache-Control: no-cache' -H 'Connection: keep-alive' -H 'Content-Type: multipart/form-data' -H 'cache-control: no-cache' -F "file_input=@\"$file\"" -F 'showheader=1' https://fossology-osm.etsi.org/?mod=agent_nomos_once |grep "A one shot license analysis shows the following license(s) in file"|sed -n 's:.*\(.*\).*:\1:p' |xargs)