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