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         - project-parameter:
25             project: '{project}'
26         - gerrit-parameters:
27             project: '{project}'
28             branch: '{branch}'
29             refspec: 'refs/heads/{branch}'
30
31     scm:
32         - gerrit-trigger-scm:
33             refspec: ''
34             choosing-strategy: 'default'
35
36     wrappers:
37         - opendaylight-infra-wrappers:
38             build-timeout: '{build-timeout}'
39
40     triggers:
41         - timed: 'H H * * 0'
42         - gerrit-trigger-patch-merged:
43             name: 'PROJECT_PATH'
44             branch: '{branch}'
45
46     prebuilders:
47         - jacoco-nojava-workaround
48         - provide-maven-settings:
49             global-settings-file: 'odl-global-settings'
50             settings-file: 'JENKINS_SETTINGS'
51
52     maven:
53         maven-name: '{mvn33}'
54         root-pom: 'POM'
55         goals: 'MAVEN_GOALS -V -B -Djenkins -Dmerge -Dstream={stream}'
56         maven-opts: 'MAVEN_OPTS'
57         settings: 'JENKINS_SETTINGS'
58         settings-type: cfp
59         global-settings: 'odl-global-settings'
60         global-settings-type: cfp
61         post-step-run-condition: UNSTABLE
62
63     postbuilders:
64         - conditional-step:
65             condition-kind: file-exists
66             condition-filename: deploy-site.xml
67             condition-basedir: workspace
68
69             # The strategy here is intentional to run Maven site:deploy twice
70             # once using regular pom.xml to produce a staged-site which is
71             # then used by deploy-site.xml to push to Nexus. This is a
72             # workaround to Maven Site's default linking code which creates
73             # incorrect URLs for sites due to auto-detection assuming your
74             # project is configured in a certain way which ODL is not.
75             steps:
76             - maven-target:
77                 maven-version: '{mvn33}'
78                 pom: pom.xml
79                 goals: 'site:deploy -V -B -Dstream={stream}'
80                 java-opts:
81                     - '-Xmx2g'
82                 settings: 'JENKINS_SETTINGS'
83                 settings-type: cfp
84                 global-settings: 'odl-global-settings'
85                 global-settings-type: cfp
86             - maven-target:
87                 maven-version: '{mvn33}'
88                 pom: deploy-site.xml
89                 goals: 'site:deploy -V -B -Dstream={stream}'
90                 java-opts:
91                     - '-Xmx2g'
92                 settings: 'JENKINS_SETTINGS'
93                 settings-type: cfp
94                 global-settings: 'odl-global-settings'
95                 global-settings-type: cfp
96
97     reporters:
98         - findbugs
99
100     publishers:
101         ARCHIVE_ARTIFACTS
102         - email-notification:
103             email-prefix: '[PROJECT_SHORTNAME]'
104         - maven-deploy:
105             id: ''
106             unique-version: true
107             deploy-unstable: false
108         - jacoco-report
109         - archive-build:
110             maven-version: '{mvn33}'