Merge "Add SXP cluster CSIT job"
[releng/builder.git] / jjb / netvirt / netvirt-sonar.yaml
1 - project:
2     name: netvirt-sonar
3     jobs:
4         - 'netvirt-sonar'
5
6     project: 'netvirt'
7     jdk: 'openjdk8'
8     archive-artifacts: '*.log'
9
10 - builder:
11     name: install-docker-composeSonar
12     builders:
13         - shell: |
14             virtualenv $WORKSPACE/venv
15             source $WORKSPACE/venv/bin/activate
16             pip install --upgrade pip
17             pip install docker-compose
18
19 - job-template:
20     name: 'netvirt-sonar'
21
22     project-type: freestyle
23     node: centos7-docker-2c-4g
24     jdk: '{jdk}'
25
26     logrotate:
27         daysToKeep: '7'
28         numToKeep: '10'
29         artifactDaysToKeep: '1'
30         artifactNumToKeep: '1'
31
32     parameters:
33         - opendaylight-infra-parameters:
34             project: '{project}'
35             branch: '{branch}'
36             refspec: 'refs/heads/{branch}'
37             artifacts: '{archive-artifacts}'
38
39     scm:
40         - git-scm:
41             refspec: ''
42             branch: 'master'
43
44     wrappers:
45         - opendaylight-infra-wrappers:
46             build-timeout: '{build-timeout}'
47
48     triggers:
49         - timed: 'H H * * 6'
50         - gerrit-trigger-patch-sonar:
51             server-name: '{server-name}'
52             name: 'netvirt'
53
54     builders:
55         - shell:
56             !include-raw-escape:
57                 - include-setup-misc.sh
58         - inject:
59             properties-file: env.properties
60         - install-docker-composeSonar
61         - maven-target:
62             maven-version: 'mvn33'
63             pom: 'pom.xml'
64             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'
65             java-opts:
66                 - '-Xmx1024m -XX:MaxPermSize=256m'
67             settings: 'netvirt-settings'
68             settings-type: cfp
69             global-settings: 'odl-global-settings'
70             global-settings-type: cfp
71         - inject:
72             properties-file: env.properties
73         - maven-target:
74             maven-version: 'mvn33'
75             pom: 'vpnservice/it/pom.xml'
76             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'
77             properties:
78                 - 'maven.repo.local=/tmp/r'
79                 - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r'
80             settings: 'netvirt-settings'
81             settings-type: cfp
82             global-settings: 'odl-global-settings'
83             global-settings-type: cfp
84         - maven-target:
85             maven-version: 'mvn33'
86             pom: 'openstack/net-virt-it/pom.xml'
87             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'
88             properties:
89                 - 'maven.repo.local=/tmp/r'
90                 - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r'
91             settings: 'netvirt-settings'
92             settings-type: cfp
93             global-settings: 'odl-global-settings'
94             global-settings-type: cfp
95         - shell:
96             !include-raw-escape:
97                 - include-raw-setup-docker.sh
98         - inject:
99             properties-file: env.properties
100         - maven-target:
101             maven-version: 'mvn33'
102             pom: 'openstack/net-virt-sfc/it/pom.xml'
103             goals: 'verify -V -B -l openstack/net-virt-sfc-sonar.log -Pintegrationtest -Dsonar -Dskip.karaf.featureTest=true -Dovsdb.controller.address=${{CONTROLLER_IP}} -Dsgm=transparent'
104             properties:
105                 - 'maven.repo.local=/tmp/r'
106                 - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r'
107                 - 'ovsdbserver.ipaddress=127.0.0.1'
108                 - 'ovsdbserver.port=6641'
109                 - 'ovsdb.userspace.enabled=yes'
110             settings: 'netvirt-settings'
111             settings-type: cfp
112             global-settings: 'odl-global-settings'
113             global-settings-type: cfp
114         - maven-target:
115             maven-version: 'mvn33'
116             # We should switch to the recommended configuration of sonar once
117             # JJB adds support for configurating the Sonar wrapper:
118             #    http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Jenkins
119             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'
120             settings: 'netvirt-settings'
121             settings-type: cfp
122             global-settings: 'odl-global-settings'
123             global-settings-type: cfp
124         - shell:
125             !include-raw-escape:
126                 - include-raw-cleanup-docker.sh
127         - jacoco-nojava-workaround
128
129     publishers:
130         - email-notification:
131             email-recipients: '{email-recipients}'
132             email-prefix: '[netvirt]'
133         - jacoco-report
134         - findbugs
135         - opendaylight-infra-shiplogs:
136             maven-version: 'mvn33'