Update mininet-ovs-25 image
[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     properties:
27         - opendaylight-infra-properties:
28             build-days-to-keep: 7
29
30     parameters:
31         - opendaylight-infra-parameters:
32             project: '{project}'
33             branch: '{branch}'
34             refspec: 'refs/heads/{branch}'
35             artifacts: '{archive-artifacts}'
36
37     scm:
38         - git-scm:
39             refspec: ''
40             branch: 'master'
41
42     wrappers:
43         - opendaylight-infra-wrappers:
44             build-timeout: '{build-timeout}'
45
46     triggers:
47         - timed: 'H H * * 6'
48         - gerrit-trigger-patch-sonar:
49             server-name: '{server-name}'
50             name: 'netvirt'
51
52     builders:
53         - shell:
54             !include-raw-escape:
55                 - 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: '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'
63             java-opts:
64                 - '-Xmx1024m -XX:MaxPermSize=256m'
65             settings: 'netvirt-settings'
66             settings-type: cfp
67             global-settings: 'odl-global-settings'
68             global-settings-type: cfp
69         - inject:
70             properties-file: env.properties
71         - maven-target:
72             maven-version: 'mvn33'
73             pom: 'vpnservice/it/pom.xml'
74             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'
75             properties:
76                 - 'maven.repo.local=/tmp/r'
77                 - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r'
78             settings: 'netvirt-settings'
79             settings-type: cfp
80             global-settings: 'odl-global-settings'
81             global-settings-type: cfp
82         - maven-target:
83             maven-version: 'mvn33'
84             pom: 'openstack/net-virt-it/pom.xml'
85             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'
86             properties:
87                 - 'maven.repo.local=/tmp/r'
88                 - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r'
89             settings: 'netvirt-settings'
90             settings-type: cfp
91             global-settings: 'odl-global-settings'
92             global-settings-type: cfp
93         - shell:
94             !include-raw-escape:
95                 - include-raw-setup-docker.sh
96         - inject:
97             properties-file: env.properties
98         - maven-target:
99             maven-version: 'mvn33'
100             pom: 'openstack/net-virt-sfc/it/pom.xml'
101             goals: 'verify -V -B -l openstack/net-virt-sfc-sonar.log -Pintegrationtest -Dsonar -Dskip.karaf.featureTest=true -Dovsdb.controller.address=${{CONTROLLER_IP}} -Dsgm=transparent'
102             properties:
103                 - 'maven.repo.local=/tmp/r'
104                 - 'org.ops4j.pax.url.mvn.localRepository=/tmp/r'
105                 - 'ovsdbserver.ipaddress=127.0.0.1'
106                 - 'ovsdbserver.port=6641'
107                 - 'ovsdb.userspace.enabled=yes'
108             settings: 'netvirt-settings'
109             settings-type: cfp
110             global-settings: 'odl-global-settings'
111             global-settings-type: cfp
112         - maven-target:
113             maven-version: 'mvn33'
114             # We should switch to the recommended configuration of sonar once
115             # JJB adds support for configurating the Sonar wrapper:
116             #    http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Jenkins
117             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'
118             settings: 'netvirt-settings'
119             settings-type: cfp
120             global-settings: 'odl-global-settings'
121             global-settings-type: cfp
122         - shell:
123             !include-raw-escape:
124                 - include-raw-cleanup-docker.sh
125         - jacoco-nojava-workaround
126
127     publishers:
128         - email-notification:
129             email-recipients: '{email-recipients}'
130             email-prefix: '[netvirt]'
131         - jacoco-report
132         - findbugs
133         - opendaylight-infra-shiplogs:
134             maven-version: 'mvn33'