global-macros.yaml revision 32e46499
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- parameter:
52    name: repo-name-parameter
53    parameters:
54        - string:
55            name: REPO_NAME
56            default: '{repo-name}'
57            description: 'Name of repo to which to publish packaging'
58
59
60##### SCMS
61- scm:
62    name: git-scm
63    scm:
64        - git:
65            credentials-id: '{credentials-id}'
66            url: '$GIT_BASE'
67            refspec: ''
68            branches:
69                - 'origin/{branch}'
70            skip-tag: true
71            wipe-workspace: true
72
73- scm:
74    name: gerrit-trigger-scm
75    scm:
76        - git:
77            credentials-id: '{credentials-id}'
78            url: '$GIT_BASE'
79            refspec: '{refspec}'
80            branches:
81                - 'origin/$GERRIT_BRANCH'
82            skip-tag: true
83            choosing-strategy: '{choosing-strategy}'
84
85- scm:
86    name: zuul-trigger-scm
87    scm:
88      - git:
89          url: '$ZUUL_URL/$ZUUL_PROJECT'
90          refspec: '{refspec}'
91          branches:
92            - '{commit}'
93          skip-tag: true
94          wipe-workspace: true
95
96###### WRAPPERS
97- wrapper:
98    name: build-timeout
99    wrappers:
100        - timeout:
101            type: absolute
102            timeout: 360
103            fail: true
104
105- wrapper:
106    # This wrapper is required for all jobs as it configures the wrappers
107    # needed by the fd.io infra.
108    name: fdio-infra-wrappers
109    wrappers:
110      - timeout:
111          type: absolute
112          timeout: '{build-timeout}'
113          timeout-var: 'BUILD_TIMEOUT'
114          fail: true
115      - jclouds:
116          single-use: True
117
118###### TRIGGERS
119- trigger:
120    name: gerrit-trigger-patch-submitted
121    triggers:
122        - gerrit:
123            server-name: 'Primary'
124            trigger-on:
125                - patchset-created-event:
126                    exclude-drafts: 'false'
127                    exclude-trivial-rebase: 'false'
128                    exclude-no-code-change: 'false'
129                - draft-published-event
130                - comment-added-contains-event:
131                    comment-contains-value: 'recheck'
132                - comment-added-contains-event:
133                    comment-contains-value: 'reverify'
134            projects:
135                - project-compare-type: 'ANT'
136                  project-pattern: '{name}'
137                  branches:
138                    - branch-compare-type: 'ANT'
139                      branch-pattern: '**/{branch}'
140
141- trigger:
142    name: gerrit-trigger-manually-triggered
143    triggers:
144        - gerrit:
145            server-name: 'Primary'
146            trigger-on:
147                - comment-added-contains-event:
148                    comment-contains-value: '{comment-trigger-value}'
149            projects:
150                - project-compare-type: 'ANT'
151                  project-pattern: '{name}'
152                  branches:
153                    - branch-compare-type: 'ANT'
154                      branch-pattern: '**/{branch}'
155
156- trigger:
157    name: gerrit-trigger-patch-merged
158    triggers:
159        - gerrit:
160            server-name: 'Primary'
161            trigger-on:
162                - change-merged-event
163                - comment-added-contains-event:
164                    comment-contains-value: 'remerge'
165            projects:
166                - project-compare-type: 'ANT'
167                  project-pattern: '{name}'
168                  branches:
169                    - branch-compare-type: 'ANT'
170                      branch-pattern: '**/{branch}'
171
172# Publishers
173- publisher:
174    name: archive-artifacts
175    publishers:
176        - archive:
177            artifacts: '{artifacts}'
178            allow-empty: true
179            fingerprint: true
180            latest-only: true
181
182- publisher:
183    name: email-notification
184    publishers:
185        - email-ext:
186            recipients: 'nobody@projectrotterdam.info'
187            reply-to:
188            content-type: default
189            subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
190            body: |
191                $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
192
193                Check console output at $BUILD_URL to view the results.
194            unstable: true
195            fixed: true
196            send-to:
197                - developers
198                - recipients
199
200- publisher:
201    name: jacoco-report
202    publishers:
203        - jacoco:
204            exec-pattern: '**/**.exec'
205            class-pattern: '**/classes'
206            source-pattern: '**/src/main/java'
207            exclusion-pattern: '**/gen**,**/generated-sources/**,**/yang-gen**,**/pax/**'
208            status-update: true
209            targets:
210                - branch:
211                    healthy: 10
212                    unhealthy: 20
213                - method:
214                    healthy: 50
215                    unhealthy: 40
216
217- publisher:
218    name: robot-report
219    publishers:
220        - robot:
221            output-path: '{output-path}'
222            other-files: ''
223
224###### BUILDERS
225- builder:
226    name: ci-management-check-unicode
227    builders:
228        - shell: |
229            $WORKSPACE/scripts/check-unicode.sh jjb/
230
231- builder:
232    name: provide-maven-settings
233    builders:
234        - config-file-provider:
235            files:
236                - file-id: '{global-settings-file}'
237                  variable: 'GLOBAL_SETTINGS_FILE'
238                - file-id: '{settings-file}'
239                  variable: 'SETTINGS_FILE'
240
241