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