Revert "Add a vpp-verify-{stream}-{os}-clang job"
[ci-management.git] / jjb / global-macros.yaml
1 # Global macros
2
3 #### PARAMETERS
4 - parameter:
5     name: project-parameter
6     parameters:
7         - string:
8             name: PROJECT
9             default: '{project}'
10             description: "JJB configured PROJECT parameter to identify a Gerrit project"
11
12 - parameter:
13     name: gerrit-parameter
14     parameters:
15         - string:
16             name: GERRIT_BRANCH
17             default: '{branch}'
18             description: "JJB configured GERRIT_BRANCH parameter"
19
20 - parameter:
21     name: gerrit-project-parameter
22     parameters:
23         - string:
24             name: GERRIT_PROJECT
25             default: '{project}'
26             description: "GERRIT_PROJECT parameter if not given by trigger"
27
28 - parameter:
29     name: os-parameter
30     parameters:
31         - string:
32             name: OS
33             default: '{os}'
34             description: "OS parameter"
35
36 - parameter:
37     name: gerrit-refspec-parameter
38     parameters:
39         - string:
40             name: GERRIT_REFSPEC
41             default: '{refspec}'
42             description: "GERRIT_REFSPEC parameter not given by trigger"
43
44 - parameter:
45     name: maven-project-parameter
46     parameters:
47         - string:
48             name: MAVEN_SELECTOR
49             default: '{maven}'
50             description: 'Maven selector to be used by shell scripts'
51
52 - parameter:
53     name: maven-exec
54     parameters:
55       - string:
56           name: MVN
57           default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn'
58           description: 'Maven selector to be used by shell scripts'
59
60 - parameter:
61     name: repo-name-parameter
62     parameters:
63         - string:
64             name: REPO_NAME
65             default: '{repo-name}'
66             description: 'Name of repo to which to publish packaging'
67
68
69 ##### SCMS
70 - scm:
71     name: git-scm
72     scm:
73         - git:
74             credentials-id: '{credentials-id}'
75             url: '$GIT_BASE'
76             refspec: ''
77             branches:
78                 - 'origin/{branch}'
79             skip-tag: true
80             wipe-workspace: true
81
82 - scm:
83     name: gerrit-trigger-scm
84     scm:
85         - git:
86             credentials-id: '{credentials-id}'
87             url: '$GIT_BASE'
88             refspec: '{refspec}'
89             branches:
90                 - 'origin/$GERRIT_BRANCH'
91             skip-tag: true
92             choosing-strategy: '{choosing-strategy}'
93
94 - scm:
95     name: zuul-trigger-scm
96     scm:
97       - git:
98           url: '$ZUUL_URL/$ZUUL_PROJECT'
99           refspec: '{refspec}'
100           branches:
101             - '{commit}'
102           skip-tag: true
103           wipe-workspace: true
104
105 ###### WRAPPERS
106 - wrapper:
107     name: build-timeout
108     wrappers:
109         - timeout:
110             type: absolute
111             timeout: 360
112             fail: true
113
114 - wrapper:
115     # This wrapper is used for all jobs that require no-activity timeouts
116     name: fdio-infra-wrappers-non-activity-timeout
117     wrappers:
118       - timeout:
119           type: no-activity
120           timeout: '{build-timeout}'
121           fail: true
122       - timestamps
123       - ssh-agent-credentials:
124           users:
125             - 'jenkins-gerrit-credentials'
126       - jclouds:
127           single-use: True
128
129 - wrapper:
130     # This wrapper is required for all jobs as it configures the wrappers
131     # needed by the fd.io infra.
132     name: fdio-infra-wrappers
133     wrappers:
134       - timeout:
135           type: absolute
136           timeout: '{build-timeout}'
137           timeout-var: 'BUILD_TIMEOUT'
138           fail: true
139       - timestamps
140       - ssh-agent-credentials:
141           users:
142               - 'jenkins-gerrit-credentials'
143       - jclouds:
144           single-use: True
145
146 ###### TRIGGERS
147 - trigger:
148     name: gerrit-trigger-patch-submitted
149     triggers:
150         - gerrit:
151             server-name: 'Primary'
152             trigger-on:
153                 - patchset-created-event:
154                     exclude-drafts: 'false'
155                     exclude-trivial-rebase: 'false'
156                     exclude-no-code-change: 'false'
157                 - draft-published-event
158                 - comment-added-contains-event:
159                     comment-contains-value: 'recheck'
160                 - comment-added-contains-event:
161                     comment-contains-value: 'reverify'
162             projects:
163                 - project-compare-type: 'ANT'
164                   project-pattern: '{name}'
165                   branches:
166                     - branch-compare-type: 'ANT'
167                       branch-pattern: '**/{branch}'
168
169 - trigger:
170     name: gerrit-trigger-manually-triggered
171     triggers:
172         - gerrit:
173             server-name: 'Primary'
174             trigger-on:
175                 - comment-added-contains-event:
176                     comment-contains-value: '{comment-trigger-value}'
177             projects:
178                 - project-compare-type: 'ANT'
179                   project-pattern: '{name}'
180                   branches:
181                     - branch-compare-type: 'ANT'
182                       branch-pattern: '**/{branch}'
183
184 - trigger:
185     name: gerrit-trigger-patch-merged
186     triggers:
187         - gerrit:
188             server-name: 'Primary'
189             trigger-on:
190                 - change-merged-event
191                 - comment-added-contains-event:
192                     comment-contains-value: 'remerge'
193             projects:
194                 - project-compare-type: 'ANT'
195                   project-pattern: '{name}'
196                   branches:
197                     - branch-compare-type: 'ANT'
198                       branch-pattern: '**/{branch}'
199             # Force Jenkins always vote the values it should already have voted
200             # during the prior verify phase
201             override-votes: true
202             gerrit-build-started-verified-value: 1
203             gerrit-build-successful-verified-value: 1
204             gerrit-build-failed-verified-value: 1
205             gerrit-build-unstable-verified-value: 1
206             gerrit-build-notbuilt-verified-value: 1
207             gerrit-build-started-codereview-value: 0
208             gerrit-build-successful-codereview-value: 0
209             gerrit-build-failed-codereview-value: 0
210             gerrit-build-unstable-codereview-value: 0
211             gerrit-build-notbuilt-codereview-value: 0
212
213 # Publishers
214 - publisher:
215     name: archive-artifacts
216     publishers:
217         - archive:
218             artifacts: '{artifacts}'
219             allow-empty: true
220             fingerprint: true
221             latest-only: true
222
223 - publisher:
224     name: email-notification
225     publishers:
226         - email-ext:
227             recipients: 'nobody@projectrotterdam.info'
228             reply-to:
229             content-type: default
230             subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
231             body: |
232                 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
233
234                 Check console output at $BUILD_URL to view the results.
235             unstable: true
236             fixed: true
237             send-to:
238                 - developers
239                 - recipients
240
241 - publisher:
242     name: jacoco-report
243     publishers:
244         - jacoco:
245             exec-pattern: '**/**.exec'
246             class-pattern: '**/classes'
247             source-pattern: '**/src/main/java'
248             exclusion-pattern: '**/gen**,**/generated-sources/**,**/yang-gen**,**/pax/**'
249             status-update: true
250             targets:
251                 - branch:
252                     healthy: 10
253                     unhealthy: 20
254                 - method:
255                     healthy: 50
256                     unhealthy: 40
257
258 - publisher:
259     name: robot-report
260     publishers:
261         - robot:
262             output-path: '{output-path}'
263             other-files: ''
264
265 ###### BUILDERS
266 - builder:
267     name: ci-management-check-unicode
268     builders:
269         - shell: |
270             $WORKSPACE/scripts/check-unicode.sh jjb/
271
272 - builder:
273     name: provide-maven-settings
274     builders:
275         - config-file-provider:
276             files:
277                 - file-id: '{global-settings-file}'
278                   variable: 'GLOBAL_SETTINGS_FILE'
279                 - file-id: '{settings-file}'
280                   variable: 'SETTINGS_FILE'