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