Stage builds to Maven Central
[releng/builder.git] / jjb / releng-templates-java.yaml
1 ---
2 - job-group:
3     name: odl-maven-jobs
4
5     jobs:
6       - gerrit-maven-clm:
7           nexus-iq-namespace: odl-
8
9       # TODO: Figure out what's wrong with the gerrit-maven-merge job.
10       # - gerrit-maven-merge:
11       #     post_build_trigger:
12       #       - project:
13       #           - 'distribution-merge-{stream}'
14       #         condition: SUCCESS
15       #         trigger-with-no-params: true
16       - '{project-name}-merge-{stream}':
17           build-timeout: 180
18           mvn-goals: clean install -V -Dmaven.compile.fork=true -Dintegrationtests -Dvtn.build.jobs=2
19
20       - gerrit-maven-stage:
21           mvn-central: true
22           ossrh-profile-id: 7edbe315063867
23       - gerrit-maven-verify
24       - gerrit-maven-verify-dependencies:
25           build-timeout: 180
26
27     mvn-version: mvn35
28
29 - job-template:
30     name: '{project-name}-integration-{stream}'
31
32     ######################
33     # Default parameters #
34     ######################
35
36     archive-artifacts: >
37       **/*.log
38       **/hs_err_*.log
39       **/target/**/feature.xml
40       **/target/failsafe-reports/failsafe-summary.xml
41       **/target/surefire-reports/*-output.txt
42     mvn-goals: clean install
43
44     #####################
45     # Job Configuration #
46     #####################
47
48     project-type: freestyle
49     node: '{build-node}'
50     jdk: '{java-version}'
51
52     properties:
53       - opendaylight-infra-properties:
54           build-days-to-keep: '{build-days-to-keep}'
55
56     parameters:
57       - opendaylight-infra-parameters:
58           os-cloud: '{os-cloud}'
59           project: '{project}'
60           branch: '{branch}'
61           refspec: 'refs/heads/{branch}'
62           artifacts: '{archive-artifacts}'
63
64     scm:
65       - git-scm:
66           refspec: ''
67           branch: '{branch}'
68
69     wrappers:
70       - opendaylight-infra-wrappers:
71           build-timeout: '{build-timeout}'
72
73     triggers:
74       - reverse:
75           jobs: '{dependencies}'
76           result: 'success'
77
78     builders:
79       - jacoco-nojava-workaround
80       - provide-maven-settings:
81           global-settings-file: 'global-settings'
82           settings-file: '{mvn-settings}'
83       - maven-target:
84           maven-version: 'mvn35'
85           goals: |
86               {mvn-goals}
87               {opendaylight-infra-mvn-opts}
88           java-opts:
89             - '{mvn-opts}'
90           settings: '{mvn-settings}'
91           settings-type: cfp
92           global-settings: 'global-settings'
93           global-settings-type: cfp
94
95     publishers:
96       - email-notification:
97           email-recipients: '{email-recipients}'
98           email-prefix: '{email-upstream}'
99       - findbugs
100       - lf-jacoco-report
101       - lf-infra-publish
102
103 - job-template:
104     name: '{project-name}-merge-{stream}'
105
106     ######################
107     # Default parameters #
108     ######################
109
110     archive-artifacts: >
111       **/*.log
112       **/hs_err_*.log
113       **/target/**/feature.xml
114       **/target/failsafe-reports/failsafe-summary.xml
115       **/target/surefire-reports/*-output.txt
116     cron: '@daily'
117     mvn-opts: ''
118     mvn-version: mvn35
119     java-version: openjdk8
120
121     #####################
122     # Job Configuration #
123     #####################
124
125     # Need to keep jobs that deploy to Nexus at end of build as Maven
126     # projects. Maybe reconsider this once upstream moves deploy to a
127     # separate lifecycle:
128     #     https://issues.apache.org/jira/browse/MNG-5666
129     project-type: maven
130     node: '{build-node}'
131     jdk: '{java-version}'
132
133     properties:
134       - opendaylight-infra-properties:
135           build-days-to-keep: 14
136
137     parameters:
138       - opendaylight-infra-parameters:
139           os-cloud: '{os-cloud}'
140           project: '{project}'
141           branch: '{branch}'
142           refspec: 'refs/heads/{branch}'
143           artifacts: '{archive-artifacts}'
144       - string:
145           name: STREAM
146           default: '{stream}'
147           description: "String representing release name"
148
149     scm:
150       - gerrit-trigger-scm:
151           refspec: ''
152           choosing-strategy: 'default'
153
154     wrappers:
155       - opendaylight-infra-wrappers:
156           build-timeout: '{build-timeout}'
157
158     triggers:
159       - timed: '{obj:cron}'
160       - gerrit-trigger-patch-merged:
161           gerrit-server-name: '{gerrit-server-name}'
162           name: '{project}'
163           branch: '{branch}'
164           files: '**'
165           forbidden-files: ''
166
167     prebuilders:
168       - jacoco-nojava-workaround
169       - provide-maven-settings:
170           global-settings-file: 'global-settings'
171           settings-file: '{mvn-settings}'
172       - lf-maven-install:
173           mvn-version: '{mvn-version}'
174
175     # TODO: Do we want to apply sophisticated checks as in *-distribution-check-*?
176     maven:
177       maven-name: '{mvn-version}'
178       goals: >
179           {mvn-goals}
180           -Dmerge
181           -Dstream={stream}
182           {opendaylight-infra-mvn-opts}
183       maven-opts: '{mvn-opts}'
184       settings: '{mvn-settings}'
185       settings-type: cfp
186       global-settings: 'global-settings'
187       global-settings-type: cfp
188       post-step-run-condition: UNSTABLE
189
190     reporters:
191       - findbugs
192
193     publishers:
194       - email-notification:
195           email-recipients: '{email-recipients}'
196           email-prefix: '[{project-name}]'
197       - maven-deploy:
198           id: ''
199           unique-version: true
200           deploy-unstable: false
201       - lf-jacoco-report
202       - lf-infra-publish