Migrate to Zuul configuration
[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 # Publishers
80 - publisher:
81     name: archive-artifacts
82     publishers:
83         - archive:
84             artifacts: '{artifacts}'
85             allow-empty: true
86             fingerprint: true
87             latest-only: true
88
89 - publisher:
90     name: email-notification
91     publishers:
92         - email-ext:
93             recipients: 'nobody@projectrotterdam.info'
94             reply-to:
95             content-type: default
96             subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
97             body: |
98                 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
99
100                 Check console output at $BUILD_URL to view the results.
101             unstable: true
102             fixed: true
103             send-to:
104                 - developers
105                 - recipients
106
107 - publisher:
108     name: jacoco-report
109     publishers:
110         - jacoco:
111             exec-pattern: '**/**.exec'
112             class-pattern: '**/classes'
113             source-pattern: '**/src/main/java'
114             exclusion-pattern: '**/gen**,**/generated-sources/**,**/yang-gen**,**/pax/**'
115             status-update: true
116             targets:
117                 - branch:
118                     healthy: 10
119                     unhealthy: 20
120                 - method:
121                     healthy: 50
122                     unhealthy: 40
123
124 ###### BUILDERS
125 - builder:
126     name: ci-management-check-unicode
127     builders:
128         - shell: |
129             $WORKSPACE/scripts/check-unicode.sh jjb/
130
131 - builder:
132     name: provide-maven-settings
133     builders:
134         - config-file-provider:
135             files:
136                 - file-id: '{global-settings-file}'
137                   variable: 'GLOBAL_SETTINGS_FILE'
138                 - file-id: '{settings-file}'
139                   variable: 'SETTINGS_FILE'
140