Merge "Add OVS 2.4.0 to ovsdb full integration"
[releng/builder.git] / jjb / releng-macros.yaml
1 # OLD Releng macros
2
3 - parameter:
4     name: project-parameter
5     parameters:
6         - string:
7             name: PROJECT
8             default: '{project}'
9             description: "JJB configured PROJECT parameter to identify an ODL Gerrit project"
10
11 - parameter:
12     name: gerrit-parameter
13     parameters:
14         - string:
15             name: GERRIT_BRANCH
16             default: '{branch}'
17             description: "JJB configured GERRIT_BRANCH parameter"
18
19 - parameter:
20     name: gerrit-project-parameter
21     parameters:
22         - string:
23             name: GERRIT_PROJECT
24             default: '{project}'
25             description: "GERRIT_PROJECT parameter if not given by trigger"
26
27 - parameter:
28     name: gerrit-refspec-parameter
29     parameters:
30         - string:
31             name: GERRIT_REFSPEC
32             default: '{refspec}'
33             description: "GERRIT_REFSPEC parameter if not given by trigger"
34
35 - parameter:
36     name: controller-version-parameter
37     parameters:
38         - string:
39             name: ODL_VERSION
40             default: '{odl_version}'
41             description: 'Controller version (for use with openstacks networking_odl project)'
42
43 - parameter:
44     name: patches-to-build-parameter
45     parameters:
46         - string:
47             name: PATCHES_TO_BUILD
48             default: ''
49             description: 'csv list of patches in project:changeset format to build distribution with'
50
51 - scm:
52     name: git-scm
53     scm:
54         - git:
55             credentials-id: '{credentials-id}'
56             url: '$GIT_BASE'
57             refspec: ''
58             branches:
59                 - 'origin/{branch}'
60             skip-tag: true
61             wipe-workspace: true
62
63 - scm:
64     name: gerrit-trigger-scm
65     scm:
66         - git:
67             credentials-id: '{credentials-id}'
68             url: '$GIT_BASE'
69             refspec: '{refspec}'
70             branches:
71                 - 'origin/$GERRIT_BRANCH'
72             skip-tag: true
73             choosing-strategy: '{choosing-strategy}'
74
75 - wrapper:
76     name: build-timeout
77     wrappers:
78         - timeout:
79             type: absolute
80             timeout: 360
81             fail: true
82
83 - trigger:
84     name: gerrit-trigger-patch-submitted
85     triggers:
86         - gerrit:
87             server-name: 'OpenDaylight'
88             trigger-on:
89                 - patchset-created-event:
90                     exclude-drafts: 'false'
91                     exclude-trivial-rebase: 'false'
92                     exclude-no-code-change: 'false'
93                 - draft-published-event
94                 - comment-added-contains-event:
95                     comment-contains-value: 'recheck'
96                 - comment-added-contains-event:
97                     comment-contains-value: 'reverify'
98             projects:
99               - project-compare-type: 'ANT'
100                 project-pattern: '{name}'
101                 branches:
102                   - branch-compare-type: 'ANT'
103                     branch-pattern: '**/{branch}'
104
105 - trigger:
106     name: gerrit-trigger-patch-merged
107     triggers:
108         - gerrit:
109             server-name: 'OpenDaylight'
110             trigger-on:
111                 - change-merged-event
112                 - comment-added-contains-event:
113                     comment-contains-value: 'remerge'
114             projects:
115               - project-compare-type: 'ANT'
116                 project-pattern: '{name}'
117                 branches:
118                   - branch-compare-type: 'ANT'
119                     branch-pattern: '**/{branch}'
120
121 - trigger:
122     name: gerrit-trigger-patch-sonar
123     triggers:
124         - gerrit:
125             server-name: 'OpenDaylight'
126             trigger-on:
127                 - comment-added-contains-event:
128                     comment-contains-value: 'run-sonar'
129             projects:
130               - project-compare-type: 'ANT'
131                 project-pattern: '{name}'
132                 branches:
133                   - branch-compare-type: 'ANT'
134                     branch-pattern: '**/master'
135             skip-vote:
136                 successful: true
137                 failed: true
138                 unstable: true
139                 notbuilt: true
140
141 - trigger:
142     name: gerrit-trigger-patch-site-merged
143     triggers:
144         - gerrit:
145             server-name: 'OpenDaylight'
146             trigger-on:
147                 - change-merged-event
148                 - comment-added-contains-event:
149                     comment-contains-value: 'republish'
150             projects:
151               - project-compare-type: 'ANT'
152                 project-pattern: '{name}'
153                 branches:
154                     - branch-compare-type: 'ANT'
155                       branch-pattern: '**/{branch}'
156
157 - publisher:
158     name: archive-artifacts
159     publishers:
160         - archive:
161             artifacts: '{artifacts}'
162             allow-empty: true
163             fingerprint: true
164             latest-only: true
165
166 - publisher:
167     name: email-notification
168     publishers:
169         - email-ext:
170             recipients: 'jenkins@lists.opendaylight.org'
171             reply-to:
172             content-type: default
173             subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
174             body: |
175                 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
176
177                 Check console output at $BUILD_URL to view the results.
178             unstable: true
179             fixed: true
180             send-to:
181                 - developers
182                 - recipients
183
184 - publisher:
185         name: jacoco-report
186         publishers:
187             - jacoco:
188                 exec-pattern: "**/**.exec"
189                 class-pattern: "**/classes"
190                 source-pattern: "**/src/main/java"
191                 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
192                 status-update: true
193                 targets:
194                   - branch:
195                       healthy: 10
196                       unhealthy: 20
197                   - method:
198                       healthy: 50
199                       unhealthy: 40
200
201 - builder:
202     name: wipe-org-opendaylight-repo
203     builders:
204         - shell: 'if [ -d /tmp/r/org/opendaylight ]; then rm -rf /tmp/r/org/opendaylight; fi'
205
206 - builder:
207     name: jacoco-nojava-workaround
208     builders:
209         - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
210
211 - builder:
212     name: check-clm
213     builders:
214         - sonatype-clm:
215             application-name: '{application-name}'
216             scan-targets: '**/target/**'
217
218 - builder:
219     name: releng-check-unicode
220     builders:
221         - shell: |
222             $WORKSPACE/scripts/check-unicode.sh jjb/
223
224 - builder:
225     name: provide-maven-settings
226     builders:
227     - config-file-provider:
228         files:
229         - file-id: '{global-settings-file}'
230           variable: 'GLOBAL_SETTINGS_FILE'
231         - file-id: '{settings-file}'
232           variable: 'SETTINGS_FILE'