516ceb05f11710586ea7518aa462dc8abe5889ad
[releng/builder.git] / jjb / releng-macros.yaml
1 # OLD Releng macros
2
3 - parameter:
4     name: project-parameter
5     parameters:
6         - string:
7             name: PROJECT
8             default: '{project}'
9             description: "JJB configured PROJECT parameter to identify an ODL Gerrit project"
10
11 - parameter:
12     name: gerrit-parameter
13     parameters:
14         - string:
15             name: GERRIT_BRANCH
16             default: '{branch}'
17             description: "JJB configured GERRIT_BRANCH parameter"
18
19 - scm:
20     name: git-scm
21     scm:
22         - git:
23             credentials-id: '{credentials-id}'
24             url: '$GIT_BASE'
25             refspec: ''
26             branches:
27                 - 'origin/{branch}'
28             skip-tag: true
29             wipe-workspace: true
30
31 - scm:
32     name: gerrit-trigger-scm
33     scm:
34         - git:
35             credentials-id: '{credentials-id}'
36             url: '$GIT_BASE'
37             refspec: '{refspec}'
38             branches:
39                 - 'origin/$GERRIT_BRANCH'
40             skip-tag: true
41             choosing-strategy: '{choosing-strategy}'
42
43 - wrapper:
44     name: build-timeout
45     wrappers:
46         - timeout:
47             type: absolute
48             timeout: 360
49             fail: true
50
51 - trigger:
52     name: gerrit-trigger-patch-submitted
53     triggers:
54         - gerrit:
55             server-name: 'OpenDaylight'
56             trigger-on:
57                 - patchset-created-event:
58                     exclude-drafts: 'false'
59                     exclude-trivial-rebase: 'false'
60                     exclude-no-code-change: 'false'
61                 - draft-published-event
62                 - comment-added-contains-event:
63                     comment-contains-value: 'recheck'
64                 - comment-added-contains-event:
65                     comment-contains-value: 'reverify'
66             projects:
67               - project-compare-type: 'ANT'
68                 project-pattern: '{name}'
69                 branches:
70                   - branch-compare-type: 'ANT'
71                     branch-pattern: '**/{branch}'
72
73 - trigger:
74     name: gerrit-trigger-patch-merged
75     triggers:
76         - gerrit:
77             server-name: 'OpenDaylight'
78             trigger-on:
79                 - change-merged-event
80                 - comment-added-contains-event:
81                     comment-contains-value: 'remerge'
82             projects:
83               - project-compare-type: 'ANT'
84                 project-pattern: '{name}'
85                 branches:
86                   - branch-compare-type: 'ANT'
87                     branch-pattern: '**/{branch}'
88
89 - publisher:
90     name: archive-artifacts
91     publishers:
92         - archive:
93             artifacts: '{artifacts}'
94             allow-empty: true
95             fingerprint: true
96             latest-only: true
97
98 - publisher:
99     name: email-notification
100     publishers:
101         - email-ext:
102             recipients: 'jenkins@lists.opendaylight.org'
103             reply-to:
104             content-type: default
105             subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
106             body: |
107                 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
108
109                 Check console output at $BUILD_URL to view the results.
110             unstable: true
111             fixed: true
112             send-to:
113                 - developers
114                 - recipients
115
116 - publisher:
117         name: jacoco-report
118         publishers:
119             - jacoco:
120                 exec-pattern: "**/**.exec"
121                 class-pattern: "**/classes"
122                 source-pattern: "**/src/main/java"
123                 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**"
124                 status-update: true
125                 targets:
126                   - branch:
127                       healthy: 10
128                       unhealthy: 20
129                   - method:
130                       healthy: 50
131                       unhealthy: 40
132
133 - builder:
134     name: wipe-org-opendaylight-repo
135     builders:
136         - shell: 'if [ -d /tmp/r/org/opendaylight ]; then rm -rf /tmp/r/org/opendaylight; fi'
137
138 - builder:
139     name: jacoco-nojava-workaround
140     builders:
141         - shell: 'mkdir -p $WORKSPACE/target/classes'
142
143 - builder:
144     name: check-clm
145     builders:
146         - sonatype-clm:
147             application-name: '{application-name}'
148             scan-targets: '**/target/**'