Merge "Fix apt concurrency failures"
[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           os-cloud: '{os-cloud}'
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: !include-raw-escape: include-setup-misc.sh
56       - inject:
57           properties-file: env.properties
58       - install-docker-composeSonar
59       - maven-target:
60           maven-version: 'mvn33'
61           pom: 'pom.xml'
62           goals: >
63               clean install dependency:tree -V -B -Dsonar
64               -Dskip.karaf.featureTest=true -Dmaven.compile.fork=true
65               -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
66           java-opts:
67             - '-Xmx1024m -XX:MaxPermSize=256m'
68           settings: 'netvirt-settings'
69           settings-type: cfp
70           global-settings: 'odl-global-settings'
71           global-settings-type: cfp
72       - inject:
73           properties-file: env.properties
74       - maven-target:
75           maven-version: 'mvn33'
76           pom: 'vpnservice/it/pom.xml'
77           goals: >
78               verify -V -B -l netvirt-vpnservice-sonar.log
79               -Pintegrationtest -Dsonar -Dskip.karaf.featureTest=true
80               -Dovsdb.controller.address=${{CONTROLLER_IP}}
81               -Ddocker.compose.file=ovs-2.5.0-hwvtep.yml
82               -Ddocker.vEnvWs=$WORKSPACE
83               -Dsgm=transparent
84           properties:
85             - 'maven.repo.local=/tmp/r'
86             - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r'
87           settings: 'netvirt-settings'
88           settings-type: cfp
89           global-settings: 'odl-global-settings'
90           global-settings-type: cfp
91       - maven-target:
92           maven-version: 'mvn33'
93           pom: 'openstack/net-virt-it/pom.xml'
94           goals: >
95               verify -V -B -l net-virt-sonar.log
96               -Pintegrationtest -Dsonar -Dskip.karaf.featureTest=true
97               -Dovsdb.controller.address=${{CONTROLLER_IP}}
98               -Ddocker.compose.file=ovs-2.5.0-hwvtep.yml
99               -Ddocker.vEnvWs=$WORKSPACE
100               -Dsgm=transparent
101           properties:
102             - 'maven.repo.local=/tmp/r'
103             - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r'
104           settings: 'netvirt-settings'
105           settings-type: cfp
106           global-settings: 'odl-global-settings'
107           global-settings-type: cfp
108       - shell: !include-raw-escape: include-raw-setup-docker.sh
109       - inject:
110           properties-file: env.properties
111       - maven-target:
112           maven-version: 'mvn33'
113           pom: 'openstack/net-virt-sfc/it/pom.xml'
114           goals: >
115               verify -V -B -l openstack/net-virt-sfc-sonar.log
116               -Pintegrationtest -Dsonar
117               -Dskip.karaf.featureTest=true
118               -Dovsdb.controller.address=${{CONTROLLER_IP}}
119               -Dsgm=transparent
120           properties:
121             - 'maven.repo.local=/tmp/r'
122             - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r'
123             - 'ovsdbserver.ipaddress=127.0.0.1'
124             - 'ovsdbserver.port=6641'
125             - 'ovsdb.userspace.enabled=yes'
126           settings: 'netvirt-settings'
127           settings-type: cfp
128           global-settings: 'odl-global-settings'
129           global-settings-type: cfp
130       - maven-target:
131           maven-version: 'mvn33'
132           # We should switch to the recommended configuration of sonar once
133           # JJB adds support for configurating the Sonar wrapper:
134           #    http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Jenkins
135           goals: >
136               sonar:sonar -V -B -Djenkins
137               -Dsonar -Dsonar.host.url=https://sonar.opendaylight.org
138               -Dmaven.repo.local=/tmp/r
139               -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
140           settings: 'netvirt-settings'
141           settings-type: cfp
142           global-settings: 'odl-global-settings'
143           global-settings-type: cfp
144       - shell: !include-raw-escape: include-raw-cleanup-docker.sh
145       - jacoco-nojava-workaround
146
147     publishers:
148       - email-notification:
149           email-recipients: '{email-recipients}'
150           email-prefix: '[netvirt]'
151       - jacoco-report
152       - findbugs
153       - opendaylight-infra-shiplogs:
154           maven-version: 'mvn33'