From 64b19c329105274ef7d1927042d9c8588944ebf7 Mon Sep 17 00:00:00 2001 From: Sam Hague Date: Thu, 20 Jul 2017 15:59:14 -0400 Subject: [PATCH] Use the default template for sonar NetVirt used a custom job for sonar so that it could include integration tests inthe coverage. IT is no longer used so the default template can be used. Change-Id: Ie0f216513abe56ac881bbd7f184a578c8818bfc2 Signed-off-by: Sam Hague --- jjb/netvirt/netvirt-sonar.yaml | 154 --------------------------------- jjb/netvirt/netvirt.yaml | 11 +++ 2 files changed, 11 insertions(+), 154 deletions(-) delete mode 100644 jjb/netvirt/netvirt-sonar.yaml diff --git a/jjb/netvirt/netvirt-sonar.yaml b/jjb/netvirt/netvirt-sonar.yaml deleted file mode 100644 index 8d274b9e27..0000000000 --- a/jjb/netvirt/netvirt-sonar.yaml +++ /dev/null @@ -1,154 +0,0 @@ ---- -- project: - name: netvirt-sonar - jobs: - - 'netvirt-sonar' - - project: 'netvirt' - jdk: 'openjdk8' - archive-artifacts: '*.log' - -- builder: - name: install-docker-composeSonar - builders: - - shell: | - virtualenv $WORKSPACE/venv - source $WORKSPACE/venv/bin/activate - PYTHON="$WORKSPACE/venv/bin/python" - $PYTHON -m pip install --upgrade pip - $PYTHON -m pip install docker-compose - -- job-template: - name: 'netvirt-sonar' - - project-type: freestyle - node: centos7-docker-2c-4g - jdk: '{jdk}' - - properties: - - opendaylight-infra-properties: - build-days-to-keep: 7 - - parameters: - - opendaylight-infra-parameters: - os-cloud: '{os-cloud}' - project: '{project}' - branch: '{branch}' - refspec: 'refs/heads/{branch}' - artifacts: '{archive-artifacts}' - - scm: - - git-scm: - refspec: '' - branch: 'master' - - wrappers: - - opendaylight-infra-wrappers: - build-timeout: '{build-timeout}' - - triggers: - - timed: 'H H * * 6' - - gerrit-trigger-patch-sonar: - server-name: '{server-name}' - name: 'netvirt' - - builders: - - shell: !include-raw-escape: include-setup-misc.sh - - inject: - properties-file: env.properties - - install-docker-composeSonar - - maven-target: - maven-version: 'mvn33' - pom: 'pom.xml' - goals: > - clean install dependency:tree -V -B -Dsonar - -Dskip.karaf.featureTest=true -Dmaven.compile.fork=true - -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r - java-opts: - - '-Xmx1024m -XX:MaxPermSize=256m' - settings: 'netvirt-settings' - settings-type: cfp - global-settings: 'global-settings' - global-settings-type: cfp - - inject: - properties-file: env.properties - - maven-target: - maven-version: 'mvn33' - pom: 'vpnservice/it/pom.xml' - goals: > - verify -V -B -l netvirt-vpnservice-sonar.log - -Pintegrationtest -Dsonar -Dskip.karaf.featureTest=true - -Dovsdb.controller.address=${{CONTROLLER_IP}} - -Ddocker.compose.file=ovs-2.5.0-hwvtep.yml - -Ddocker.vEnvWs=$WORKSPACE - -Dsgm=transparent - properties: - - 'maven.repo.local=/tmp/r' - - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r' - settings: 'netvirt-settings' - settings-type: cfp - global-settings: 'global-settings' - global-settings-type: cfp - - maven-target: - maven-version: 'mvn33' - pom: 'openstack/net-virt-it/pom.xml' - goals: > - verify -V -B -l net-virt-sonar.log - -Pintegrationtest -Dsonar -Dskip.karaf.featureTest=true - -Dovsdb.controller.address=${{CONTROLLER_IP}} - -Ddocker.compose.file=ovs-2.5.0-hwvtep.yml - -Ddocker.vEnvWs=$WORKSPACE - -Dsgm=transparent - properties: - - 'maven.repo.local=/tmp/r' - - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r' - settings: 'netvirt-settings' - settings-type: cfp - global-settings: 'global-settings' - global-settings-type: cfp - - shell: !include-raw-escape: include-raw-setup-docker.sh - - inject: - properties-file: env.properties - - maven-target: - maven-version: 'mvn33' - pom: 'openstack/net-virt-sfc/it/pom.xml' - goals: > - verify -V -B -l openstack/net-virt-sfc-sonar.log - -Pintegrationtest -Dsonar - -Dskip.karaf.featureTest=true - -Dovsdb.controller.address=${{CONTROLLER_IP}} - -Dsgm=transparent - properties: - - 'maven.repo.local=/tmp/r' - - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r' - - 'ovsdbserver.ipaddress=127.0.0.1' - - 'ovsdbserver.port=6641' - - 'ovsdb.userspace.enabled=yes' - settings: 'netvirt-settings' - settings-type: cfp - global-settings: 'global-settings' - global-settings-type: cfp - - maven-target: - maven-version: 'mvn33' - # We should switch to the recommended configuration of sonar once - # JJB adds support for configurating the Sonar wrapper: - # http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Jenkins - goals: > - sonar:sonar -V -B -Djenkins - -Dsonar -Dsonar.host.url=https://sonar.opendaylight.org - -Dmaven.repo.local=/tmp/r - -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r - settings: 'netvirt-settings' - settings-type: cfp - global-settings: 'global-settings' - global-settings-type: cfp - - shell: !include-raw-escape: include-raw-cleanup-docker.sh - - jacoco-nojava-workaround - - publishers: - - email-notification: - email-recipients: '{email-recipients}' - email-prefix: '[netvirt]' - - jacoco-report - - findbugs - - lf-infra-publish diff --git a/jjb/netvirt/netvirt.yaml b/jjb/netvirt/netvirt.yaml index a9b3608989..f74d3ce655 100644 --- a/jjb/netvirt/netvirt.yaml +++ b/jjb/netvirt/netvirt.yaml @@ -120,3 +120,14 @@ dependencies: email-upstream: '[netvirt]' archive-artifacts: '' + +- project: + name: netvirt-sonar + jobs: + - '{project-name}-sonar' + project: 'netvirt' + project-name: 'netvirt' + branch: 'master' + mvn-settings: 'netvirt-settings' + mvn-goals: 'clean install' + mvn-opts: '-Xmx1024m -XX:MaxPermSize=256m' -- 2.36.6