Merge "Migrate docs-rtd to archive-builds macro"
[releng/builder.git] / jjb-templates / merge.yaml
1 - job-template:
2     name: 'PROJECT_SHORTNAME-merge-{stream}'
3
4     # Job template for ODL merge jobs
5     #
6     # The purpose of this job template is to setup a ODL merge job
7     # and deploy artifacts to Nexus.
8     #
9     # Required Variables:
10     #     stream:    release stream (eg. stable-lithium or beryllium)
11     #     branch:    git branch (eg. stable/lithium or master)
12
13     project-type: maven
14     node: dynamic_merge
15     jdk: '{jdk}'
16
17     logrotate:
18         daysToKeep: '14'
19         numToKeep: '10'
20         artifactDaysToKeep: '{build-artifact-days-to-keep}'
21         artifactNumToKeep: '{build-artifact-num-to-keep}'
22
23     parameters:
24         - opendaylight-infra-parameters:
25             project: '{project}'
26             branch: '{branch}'
27             refspec: 'refs/heads/{branch}'
28             artifacts: '{archive-artifacts}'
29
30     scm:
31         - gerrit-trigger-scm:
32             refspec: ''
33             choosing-strategy: 'default'
34
35     wrappers:
36         - opendaylight-infra-wrappers:
37             build-timeout: '{build-timeout}'
38
39     triggers:
40         - timed: 'H H * * 0'
41         - gerrit-trigger-patch-merged:
42             name: 'PROJECT_PATH'
43             branch: '{branch}'
44
45     prebuilders:
46         - jacoco-nojava-workaround
47         - provide-maven-settings:
48             global-settings-file: 'odl-global-settings'
49             settings-file: 'JENKINS_SETTINGS'
50
51     maven:
52         maven-name: '{mvn33}'
53         root-pom: 'POM'
54         goals: 'MAVEN_GOALS -V -B -Djenkins -Dmerge -Dstream={stream}'
55         maven-opts: 'MAVEN_OPTS'
56         settings: 'JENKINS_SETTINGS'
57         settings-type: cfp
58         global-settings: 'odl-global-settings'
59         global-settings-type: cfp
60         post-step-run-condition: UNSTABLE
61
62     postbuilders:
63         - conditional-step:
64             condition-kind: file-exists
65             condition-filename: deploy-site.xml
66             condition-basedir: workspace
67
68             # The strategy here is intentional to run Maven site:deploy twice
69             # once using regular pom.xml to produce a staged-site which is
70             # then used by deploy-site.xml to push to Nexus. This is a
71             # workaround to Maven Site's default linking code which creates
72             # incorrect URLs for sites due to auto-detection assuming your
73             # project is configured in a certain way which ODL is not.
74             steps:
75             - maven-target:
76                 maven-version: '{mvn33}'
77                 pom: pom.xml
78                 goals: 'site:deploy -V -B -Dstream={stream}'
79                 java-opts:
80                     - '-Xmx2g'
81                 settings: 'JENKINS_SETTINGS'
82                 settings-type: cfp
83                 global-settings: 'odl-global-settings'
84                 global-settings-type: cfp
85             - maven-target:
86                 maven-version: '{mvn33}'
87                 pom: deploy-site.xml
88                 goals: 'site:deploy -V -B -Dstream={stream}'
89                 java-opts:
90                     - '-Xmx2g'
91                 settings: 'JENKINS_SETTINGS'
92                 settings-type: cfp
93                 global-settings: 'odl-global-settings'
94                 global-settings-type: cfp
95
96     reporters:
97         - findbugs
98
99     publishers:
100         ARCHIVE_ARTIFACTS
101         - email-notification:
102             email-prefix: '[PROJECT_SHORTNAME]'
103         - maven-deploy:
104             id: ''
105             unique-version: true
106             deploy-unstable: false
107         - jacoco-report
108         - archive-build:
109             maven-version: '{mvn33}'