Merge "Revert autorelease builders back to 4c-16g"
[releng/builder.git] / jjb / ovsdb / ovsdb-sonar.yaml
1 ---
2 - project:
3     name: ovsdb-sonar
4     jobs:
5       - 'ovsdb-sonar'
6
7     project: 'ovsdb'
8     jdk: 'openjdk8'
9
10 - job-template:
11     name: 'ovsdb-sonar'
12
13     project-type: freestyle
14     node: centos7-docker-1c-4g
15     jdk: '{java-version}'
16
17     properties:
18       - opendaylight-infra-properties:
19           build-days-to-keep: 7
20
21     parameters:
22       - opendaylight-infra-parameters:
23           os-cloud: '{os-cloud}'
24           project: '{project}'
25           branch: '{branch}'
26           refspec: 'refs/heads/{branch}'
27           artifacts: '{archive-artifacts}'
28
29     scm:
30       - git-scm:
31           refspec: ''
32           branch: 'master'
33
34     wrappers:
35       - opendaylight-infra-wrappers:
36           build-timeout: '{build-timeout}'
37
38     triggers:
39       - timed: '{schedule-saturday}'
40       - gerrit:
41           server-name: '{gerrit-server-name}'
42           trigger-on:
43             - comment-added-contains-event:
44                 comment-contains-value: 'run-sonar$'
45           projects:
46             - project-compare-type: 'ANT'
47               project-pattern: '{project}'
48               branches:
49                 - branch-compare-type: 'ANT'
50                   branch-pattern: '**/master'
51           skip-vote:
52             successful: true
53             failed: true
54             unstable: true
55             notbuilt: true
56
57     builders:
58       - shell: !include-raw-escape: setup-docker.sh
59       - inject:
60           properties-file: env.properties
61       - shell: !include-raw-escape: include-setup-hwvtep-docker.sh
62       - maven-target:
63           maven-version: 'mvn35'
64           pom: 'pom.xml'
65           goals: >
66               clean install dependency:tree -V -B -Dsonar
67               -Dskip.karaf.featureTest=true -Dmaven.compile.fork=true
68               -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
69           java-opts:
70             - '-Xmx1024m -XX:MaxPermSize=256m'
71           settings: 'ovsdb-settings'
72           settings-type: cfp
73           global-settings: 'global-settings'
74           global-settings-type: cfp
75       - inject:
76           properties-file: env.properties
77       - maven-target:
78           maven-version: 'mvn35'
79           pom: 'pom.xml'
80           goals: >
81               verify -V -B -Pintegrationtest -Dsonar
82               -Dskip.karaf.featureTest=true
83               -Dovsdb.controller.address=${{CONTROLLER_IP}}
84               -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
85           properties:
86             - 'ovsdbserver.ipaddress=127.0.0.1'
87             - 'ovsdbserver.port=6641'
88             - 'ovsdb.userspace.enabled=yes'
89           settings: 'ovsdb-settings'
90           settings-type: cfp
91           global-settings: 'global-settings'
92           global-settings-type: cfp
93       - maven-target:
94           maven-version: 'mvn35'
95           # We should switch to the recommended configuration of sonar once
96           # JJB adds support for configurating the Sonar wrapper:
97           #    http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Jenkins
98           goals: >
99               sonar:sonar -V -B -Djenkins -Dsonar
100               -Dsonar.host.url=https://sonar.opendaylight.org
101               -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
102           settings: 'ovsdb-settings'
103           settings-type: cfp
104           global-settings: 'global-settings'
105           global-settings-type: cfp
106       - shell: !include-raw-escape: cleanup-docker.sh
107       - lf-jacoco-nojava-workaround
108
109     publishers:
110       - email-notification:
111           email-recipients: '{email-recipients}'
112           email-prefix: '[ovsdb]'
113       - lf-jacoco-report
114       - lf-infra-publish