refactor email recipients to parameter with default value
[releng/builder.git] / jjb / autorelease / autorelease-templates.yaml
1 # Autorelease build jobs
2
3 - job-template:
4     name: 'autorelease-release-{stream}'
5
6     project-type: freestyle
7     node: centos7-autorelease-4c-16g
8     jdk: '{jdk}'
9
10     logrotate:
11         daysToKeep: '{build-days-to-keep}'
12         artifactDaysToKeep: '14'
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: ''
32             branches:
33                 - 'origin/{branch}'
34             skip-tag: true
35             submodule:
36                 recursive: true
37                 timeout: 60
38
39     wrappers:
40         - opendaylight-infra-wrappers:
41             build-timeout: '1440'
42
43     triggers:
44         - timed: 'H 0 * * *'
45
46     builders:
47         # force jenkins install of maven version before any shell scripts use it
48         - maven-target:
49             maven-version: 'mvn33'
50             goals: '-version'
51             settings: 'autorelease-settings'
52             settings-type: cfp
53             global-settings: 'odl-global-settings'
54             global-settings-type: cfp
55         - wipe-local-maven-repo
56         - jacoco-nojava-workaround
57         - shell: "./scripts/list-project-dependencies.sh"
58         - autorelease-cfp:
59             autorelease-settings: 'autorelease-settings'
60             odl-global-settings: 'odl-global-settings'
61         - autorelease-generate-taglist
62         - autorelease-distribute-taglist
63         - autorelease-generate-release-patches
64         - maven-target:
65               maven-version: 'mvn33'
66               pom: 'pom.xml'
67               goals: 'clean deploy -V -B -Pintegrationtests,docs,repoBuild -Djenkins -Dcheckstyle.skip=true -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage'
68               java-opts:
69                 - '-Xmx10g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
70               settings: 'autorelease-settings'
71               settings-type: cfp
72               global-settings: 'odl-global-settings'
73               global-settings-type: cfp
74         - autorelease-maven-deploy
75         - autorelease-get-integration-test-variables
76         - autorelease-maven-sources:
77             maven-version: 'mvn33'
78             settings: 'autorelease-settings'
79             global-settings: 'odl-global-settings'
80         - autorelease-maven-sources-post-process
81         - autorelease-sys-stats
82         - shell: |
83             mkdir -p archives/
84             cp *.log *.prop $_
85
86     publishers:
87         - email-notification:
88             email-recipients: '{email-recipients}'
89             email-prefix: '[autorelease]'
90         - trigger-parameterized-builds:
91             - project: 'integration-distribution-test-{integration-test}'
92               condition: UNSTABLE_OR_BETTER
93               property-file: variables.jenkins-trigger
94               fail-on-missing: true
95         - opendaylight-infra-shiplogs:
96             maven-version: 'mvn33'
97
98 - job-template:
99     name: 'autorelease-project-report-{stream}'
100
101     project-type: freestyle
102     node: centos7-java-builder-2c-8g
103
104     logrotate:
105         daysToKeep: '{build-days-to-keep}'
106         numToKeep: '{build-num-to-keep}'
107         artifactDaysToKeep: '{build-artifact-days-to-keep}'
108         artifactNumToKeep: '{build-artifact-num-to-keep}'
109
110     parameters:
111         - opendaylight-infra-parameters:
112             project: '{project}'
113             branch: '{branch}'
114             refspec: 'refs/heads/{branch}'
115             artifacts: '{archive-artifacts}'
116         - string:
117             name: REPORT_DIR
118             default: '$WORKSPACE/project-reports'
119             description: "The directory containing project reports"
120
121     scm:
122         - git:
123             credentials-id: 'opendaylight-jenkins-ssh'
124             url: '$GIT_BASE'
125             refspec: ''
126             branches:
127                 - 'origin/{branch}'
128             skip-tag: true
129             submodule:
130                 recursive: true
131
132     wrappers:
133         - opendaylight-infra-wrappers:
134             build-timeout: '30'
135
136     triggers:
137         - timed: '0 0 * * 0'
138
139     builders:
140         - shell: 'echo "DATE=`date +%Y-%m-%d`" > $WORKSPACE/variables.prop'
141         - inject:
142             properties-file: variables.prop
143         - autorelease-generate-project-report
144         - shell: "./scripts/list-project-dependencies.sh"
145         - autorelease-sys-stats
146
147     publishers:
148         - email-ext:
149             attachments: 'project-reports/*.log'
150             recipients: 'skitt@redhat.com thanh.ha@linuxfoundation.org'
151             reply-to: dev@lists.opendaylight.org
152             content-type: default
153             subject: '[releng] ODL {stream} project report for ${{ENV, var="DATE"}}'
154             body: |
155                 This is a project report generated on $DATE listing the commit
156                 history of ODL projects for the past week. See attached
157                 git-report.log
158                 Archive also available on Jenkins at $BUILD_URL
159             always: true
160         - opendaylight-infra-shiplogs:
161             maven-version: 'mvn33'