fix bad key call
[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: gerrit-refspec-parameter
30     parameters:
31         - string:
32             name: GERRIT_REFSPEC
33             default: '{refspec}'
34             description: "GERRIT_REFSPEC parameter not given by trigger"
35
36 ##### SCMS
37 - scm:
38     name: git-scm
39     scm:
40         - git:
41             credentials-id: '{credentials-id}'
42             url: '$GIT_BASE'
43             refspec: ''
44             branches:
45                 - 'origin/${branch}'
46             skip-tag: true
47             wipe-workspace: true
48
49 - scm:
50     name: gerrit-trigger-scm
51     scm:
52         - git:
53             credentials-id: '{credentials-id}'
54             url: '$GIT_BASE'
55             refspec: '{refspec}'
56             branches:
57                 - 'origin/$GERRIT_BRANCH'
58             skip-tag: true
59             choosing-strategy: '{choosing-strategy}'
60
61 ###### WRAPPERS
62 - wrapper:
63     name: build-timeout
64     wrappers:
65         - timeout:
66             type: absolute
67             timeout: 360
68             fail: true
69
70 ###### TRIGGERS
71 - trigger:
72     name: gerrit-trigger-patch-submitted
73     triggers:
74         - gerrit:
75             server-name: 'Default'
76             trigger-on:
77                 - patchset-created-event:
78                     exclude-drafts: 'false'
79                     exclude-trivial-rebase: 'false'
80                     exclude-no-code-change: 'false'
81                 - draft-published-event
82                 - comment-added-contains-event:
83                     comment-contains-value: 'recheck'
84                 - comment-added-contains-event:
85                     comment-contains-value: 'reverify'
86             projects:
87                 - project-compare-type: 'ANT'
88                   project-pattern: '{name}'
89                   branches:
90                     - branch-compare-type: 'ANT'
91                       branch-pattern: '**/{branch}'
92
93 - trigger:
94     name: gerrit-trigger-patch-merged
95     triggers:
96         - gerrit:
97             server-name: 'Default'
98             trigger-on:
99                 - change-merged-event
100                 - comment-added-contains-event:
101                     comment-contains-value: 'remerge'
102             projects:
103                 - project-compare-type: 'ANT'
104                   project-pattern: '{name}'
105                   branches:
106                     - branch-compare-type: 'ANT'
107                       branch-pattern: '**/{branch}'
108
109 # Publishers
110 - publisher:
111     name: archive-artifacts
112     publishers:
113         - archive:
114             artifacts: '{artifacts}'
115             allow-empty: true
116             fingerprint: true
117             latest-only: true
118
119 - publisher:
120     name: email-notification
121     publishers:
122         - email-ext:
123             recipients: 'nobody@projectrotterdam.info'
124             reply-to:
125             content-type: default
126             subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
127             body: |
128                 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
129
130                 Check console output at $BUILD_URL to view the results.
131             unstable: true
132             fixed: true
133             send-to:
134                 - developers
135                 - recipients
136
137 - publisher:
138     name: jacoco-report
139     publishers:
140         - jacoco:
141             exec-pattern: '**/**.exec'
142             class-pattern: '**/classes'
143             source-pattern: '**/src/main/java'
144             exclusion-pattern: '**/gen**,**/generated-sources/**,**/yang-gen**,**/pax/**'
145             status-update: true
146             targets:
147                 - branch:
148                     healthy: 10
149                     unhealthy: 20
150                 - method:
151                     healthy: 50
152                     unhealthy: 40
153
154 ###### BUILDERS
155 - builder:
156     name: ci-management-check-unicode
157     builders:
158         - shell: |
159             $WORKSPACE/scripts/check-unicode.sh jjb/
160
161 - builder:
162     name: provide-maven-settings
163     builders:
164         - config-file-provider:
165             files:
166                 - file-id: '{global-settings}'
167                   variable: 'GLOBAL_SETTINGS_FILE'
168                 - file-id: '{settings-file}'
169                   variable: 'SETTINGS_FILE'
170