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