Merge "Add a new job for TSDR elasticSearch"
[releng/builder.git] / jjb / autorelease / autorelease-templates.yaml
1 ---
2 # Autorelease build jobs
3 - job-template:
4     name: 'autorelease-release-{stream}'
5
6     project-type: freestyle
7     node: centos7-autorelease-4c-16g
8     jdk: '{jdk}'
9
10     properties:
11       - opendaylight-infra-properties:
12           build-days-to-keep: '30'
13
14     parameters:
15       - maven-exec:
16           maven-version: 'mvn33'
17       - opendaylight-infra-parameters:
18           project: '{project}'
19           branch: '{branch}'
20           refspec: 'refs/heads/{branch}'
21           artifacts: '{archive-artifacts}'
22       - autorelease-release-tag:
23           release-tag: '{next-release-tag}'
24       - autorelease-release-branch:
25           release-branch: '{branch}'
26
27     scm:
28       - git:
29           credentials-id: 'opendaylight-jenkins-ssh'
30           url: '$GIT_BASE'
31           refspec: '$GERRIT_REFSPEC'
32           branches:
33             - '$GERRIT_BRANCH'
34           choosing-strategy: 'gerrit'
35           skip-tag: true
36           submodule:
37             recursive: true
38             timeout: 60
39
40     wrappers:
41       - opendaylight-infra-wrappers:
42           build-timeout: '1440'
43
44     triggers:
45       - timed: 'H 0 * * *'
46
47     builders:
48       # force jenkins install of maven version before any shell scripts use it
49       - maven-target:
50           maven-version: 'mvn33'
51           goals: '-version'
52           settings: 'autorelease-settings'
53           settings-type: cfp
54           global-settings: 'odl-global-settings'
55           global-settings-type: cfp
56       - wipe-local-maven-repo
57       - jacoco-nojava-workaround
58       - shell: "./scripts/list-project-dependencies.sh"
59       - autorelease-determine-merge-order
60       - autorelease-cfp:
61           autorelease-settings: 'autorelease-settings'
62           odl-global-settings: 'odl-global-settings'
63       - autorelease-generate-taglist
64       - autorelease-distribute-taglist
65       - distribute-build-url:
66           path: 'integration/distribution/distribution-karaf/src/main/assembly'
67       - autorelease-generate-release-patches
68       # In a perfect world projects should be releasing separately and we consume them
69       # via a project that pulls the release bits from each project from Nexus.
70       # Keep the patches compatible with that ideal, but apply an edit
71       # to enable building in a single maven reactor afterwards.
72       - autorelease-fix-relative-paths
73       - maven-target:
74           maven-version: 'mvn33'
75           pom: 'pom.xml'
76           goals: >
77               clean deploy -V -B -Pintegrationtests,docs,repoBuild -Djenkins
78               -Dcheckstyle.skip=true
79               -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
80               -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage
81           java-opts:
82             - '-Xmx10g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
83           settings: 'autorelease-settings'
84           settings-type: cfp
85           global-settings: 'odl-global-settings'
86           global-settings-type: cfp
87       - autorelease-maven-deploy
88       - autorelease-get-integration-test-variables
89       - autorelease-maven-sources:
90           maven-version: 'mvn33'
91           settings: 'autorelease-settings'
92           global-settings: 'odl-global-settings'
93       - autorelease-maven-sources-post-process
94       - autorelease-sys-stats
95       - shell: |
96           mkdir -p archives/
97           cp *.log *.prop $_
98
99     publishers:
100       - opendaylight-infra-notify-status
101       - archive:
102           # Need to archive dependencies.log in Jenkins to provide a simple
103           # way for downstream jobs to pull the latest version of this file
104           # in their builds.
105           artifacts: 'dependencies.log'
106       - email-notification:
107           email-recipients: '{email-recipients}'
108           email-prefix: '[autorelease]'
109       - trigger-parameterized-builds:
110           - project: 'integration-distribution-test-{integration-test}'
111             condition: UNSTABLE_OR_BETTER
112             property-file: variables.jenkins-trigger
113             fail-on-missing: true
114           - project: 'packaging-build-rpm-master'
115             condition: UNSTABLE_OR_BETTER
116             predefined-parameters: DOWNLOAD_URL=$BUNDLEURL
117             property-file: variables.jenkins-trigger
118             fail-on-missing: true
119       - opendaylight-infra-shiplogs:
120           maven-version: 'mvn33'
121
122
123 - job-template:
124     name: 'autorelease-project-report-{stream}'
125
126     project-type: freestyle
127     node: centos7-java-builder-2c-8g
128
129     properties:
130       - opendaylight-infra-properties:
131           build-days-to-keep: '{build-days-to-keep}'
132
133     parameters:
134       - opendaylight-infra-parameters:
135           project: '{project}'
136           branch: '{branch}'
137           refspec: 'refs/heads/{branch}'
138           artifacts: '{archive-artifacts}'
139       - string:
140           name: REPORT_DIR
141           default: '$WORKSPACE/project-reports'
142           description: "The directory containing project reports"
143
144     scm:
145       - git:
146           credentials-id: 'opendaylight-jenkins-ssh'
147           url: '$GIT_BASE'
148           refspec: '$GERRIT_REFSPEC'
149           branches:
150             - '$GERRIT_BRANCH'
151           choosing-strategy: 'gerrit'
152           skip-tag: true
153           submodule:
154             recursive: true
155
156     wrappers:
157       - opendaylight-infra-wrappers:
158           build-timeout: '30'
159
160     triggers:
161       - timed: '0 0 * * 0'
162
163     builders:
164       - shell: 'echo "DATE=`date +%Y-%m-%d`" > $WORKSPACE/variables.prop'
165       - inject:
166           properties-file: variables.prop
167       - autorelease-generate-project-report
168       - shell: "./scripts/list-project-dependencies.sh"
169       - autorelease-determine-merge-order
170       - autorelease-sys-stats
171
172     publishers:
173       - email-ext:
174           attachments: 'project-reports/*.log'
175           recipients: 'skitt@redhat.com thanh.ha@linuxfoundation.org'
176           reply-to: dev@lists.opendaylight.org
177           content-type: default
178           subject: '[releng] ODL {stream} project report for ${{ENV, var="DATE"}}'
179           body: |
180               This is a project report generated on $DATE listing the commit
181               history of ODL projects for the past week. See attached
182               git-report.log
183               Archive also available on Jenkins at $BUILD_URL
184           always: true
185       - opendaylight-infra-shiplogs:
186           maven-version: 'mvn33'