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