Merge "Move builder jobs to run on minion nodes"
[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     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: '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'
77               java-opts:
78                 - '-Xmx10g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
79               settings: 'autorelease-settings'
80               settings-type: cfp
81               global-settings: 'odl-global-settings'
82               global-settings-type: cfp
83         - autorelease-maven-deploy
84         - autorelease-get-integration-test-variables
85         - autorelease-maven-sources:
86             maven-version: 'mvn33'
87             settings: 'autorelease-settings'
88             global-settings: 'odl-global-settings'
89         - autorelease-maven-sources-post-process
90         - autorelease-sys-stats
91         - opendaylight-infra-notify-status
92         - shell: |
93             mkdir -p archives/
94             cp *.log *.prop $_
95
96     publishers:
97         - archive:
98             # Need to archive dependencies.log in Jenkins to provide a simple
99             # way for downstream jobs to pull the latest version of this file
100             # in their builds.
101             artifacts: 'dependencies.log'
102         - email-notification:
103             email-recipients: '{email-recipients}'
104             email-prefix: '[autorelease]'
105         - trigger-parameterized-builds:
106             - project: 'integration-distribution-test-{integration-test}'
107               condition: UNSTABLE_OR_BETTER
108               property-file: variables.jenkins-trigger
109               fail-on-missing: true
110             - project: 'packaging-build-rpm-master'
111               condition: UNSTABLE_OR_BETTER
112               predefined-parameters: DOWNLOAD_URL=$BUNDLEURL
113               property-file: variables.jenkins-trigger
114               fail-on-missing: true
115         - opendaylight-infra-shiplogs:
116             maven-version: 'mvn33'
117
118 - job-template:
119     name: 'autorelease-project-report-{stream}'
120
121     project-type: freestyle
122     node: centos7-java-builder-2c-8g
123
124     properties:
125         - opendaylight-infra-properties:
126             build-days-to-keep: '{build-days-to-keep}'
127
128     parameters:
129         - opendaylight-infra-parameters:
130             project: '{project}'
131             branch: '{branch}'
132             refspec: 'refs/heads/{branch}'
133             artifacts: '{archive-artifacts}'
134         - string:
135             name: REPORT_DIR
136             default: '$WORKSPACE/project-reports'
137             description: "The directory containing project reports"
138
139     scm:
140         - git:
141             credentials-id: 'opendaylight-jenkins-ssh'
142             url: '$GIT_BASE'
143             refspec: '$GERRIT_REFSPEC'
144             branches:
145                 - '$GERRIT_BRANCH'
146             choosing-strategy: 'gerrit'
147             skip-tag: true
148             submodule:
149                 recursive: true
150
151     wrappers:
152         - opendaylight-infra-wrappers:
153             build-timeout: '30'
154
155     triggers:
156         - timed: '0 0 * * 0'
157
158     builders:
159         - shell: 'echo "DATE=`date +%Y-%m-%d`" > $WORKSPACE/variables.prop'
160         - inject:
161             properties-file: variables.prop
162         - autorelease-generate-project-report
163         - shell: "./scripts/list-project-dependencies.sh"
164         - autorelease-determine-merge-order
165         - autorelease-sys-stats
166
167     publishers:
168         - email-ext:
169             attachments: 'project-reports/*.log'
170             recipients: 'skitt@redhat.com thanh.ha@linuxfoundation.org'
171             reply-to: dev@lists.opendaylight.org
172             content-type: default
173             subject: '[releng] ODL {stream} project report for ${{ENV, var="DATE"}}'
174             body: |
175                 This is a project report generated on $DATE listing the commit
176                 history of ODL projects for the past week. See attached
177                 git-report.log
178                 Archive also available on Jenkins at $BUILD_URL
179             always: true
180         - opendaylight-infra-shiplogs:
181             maven-version: 'mvn33'