refactor email recipients to parameter with default value
[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             name: 'netvirt'
52
53     builders:
54         - shell:
55             !include-raw-escape:
56                 - include-setup-misc.sh
57         - inject:
58             properties-file: env.properties
59         - install-docker-composeSonar
60         - maven-target:
61             maven-version: 'mvn33'
62             pom: 'pom.xml'
63             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'
64             java-opts:
65                 - '-Xmx1024m -XX:MaxPermSize=256m'
66             settings: 'netvirt-settings'
67             settings-type: cfp
68             global-settings: 'odl-global-settings'
69             global-settings-type: cfp
70         - inject:
71             properties-file: env.properties
72         - maven-target:
73             maven-version: 'mvn33'
74             pom: 'vpnservice/it/pom.xml'
75             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'
76             properties:
77                 - 'maven.repo.local=/tmp/r'
78                 - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r'
79             settings: 'netvirt-settings'
80             settings-type: cfp
81             global-settings: 'odl-global-settings'
82             global-settings-type: cfp
83         - maven-target:
84             maven-version: 'mvn33'
85             pom: 'openstack/net-virt-it/pom.xml'
86             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'
87             properties:
88                 - 'maven.repo.local=/tmp/r'
89                 - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r'
90             settings: 'netvirt-settings'
91             settings-type: cfp
92             global-settings: 'odl-global-settings'
93             global-settings-type: cfp
94         - shell:
95             !include-raw-escape:
96                 - include-raw-setup-docker.sh
97         - inject:
98             properties-file: env.properties
99         - maven-target:
100             maven-version: 'mvn33'
101             pom: 'openstack/net-virt-sfc/it/pom.xml'
102             goals: 'verify -V -B -l openstack/net-virt-sfc-sonar.log -Pintegrationtest -Dsonar -Dskip.karaf.featureTest=true -Dovsdb.controller.address=${{CONTROLLER_IP}} -Dsgm=transparent'
103             properties:
104                 - 'maven.repo.local=/tmp/r'
105                 - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r'
106                 - 'ovsdbserver.ipaddress=127.0.0.1'
107                 - 'ovsdbserver.port=6641'
108                 - 'ovsdb.userspace.enabled=yes'
109             settings: 'netvirt-settings'
110             settings-type: cfp
111             global-settings: 'odl-global-settings'
112             global-settings-type: cfp
113         - maven-target:
114             maven-version: 'mvn33'
115             # We should switch to the recommended configuration of sonar once
116             # JJB adds support for configurating the Sonar wrapper:
117             #    http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Jenkins
118             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'
119             settings: 'netvirt-settings'
120             settings-type: cfp
121             global-settings: 'odl-global-settings'
122             global-settings-type: cfp
123         - shell:
124             !include-raw-escape:
125                 - include-raw-cleanup-docker.sh
126         - jacoco-nojava-workaround
127
128     publishers:
129         - email-notification:
130             email-recipients: '{email-recipients}'
131             email-prefix: '[netvirt]'
132         - jacoco-report
133         - findbugs
134         - opendaylight-infra-shiplogs:
135             maven-version: 'mvn33'