Fix iotdm.yaml for nitrogen and carbon
[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       - build-discarder:
13           days-to-keep: '30'
14           num-to-keep: 40
15           artifact-num-to-keep: 1
16     # Make sure we only archive the last artifact until we figure out why
17     # autorelease carbon is not generating a staging repo.
18     #   - opendaylight-infra-properties:
19     #       build-days-to-keep: '30'
20
21     parameters:
22       - maven-exec:
23           maven-version: 'mvn33'
24       - opendaylight-infra-parameters:
25           os-cloud: '{os-cloud}'
26           project: '{project}'
27           branch: '{branch}'
28           refspec: 'refs/heads/{branch}'
29           artifacts: '{archive-artifacts}'
30       - distribution-karaf-version:
31           karaf-version: '{karaf-version}'
32       - autorelease-release-tag:
33           release-tag: '{next-release-tag}'
34       - autorelease-release-branch:
35           release-branch: '{branch}'
36
37     scm:
38       - git:
39           credentials-id: 'opendaylight-jenkins-ssh'
40           url: '$GIT_BASE'
41           refspec: '$GERRIT_REFSPEC'
42           branches:
43             - '$GERRIT_BRANCH'
44           choosing-strategy: 'gerrit'
45           skip-tag: true
46           submodule:
47             recursive: true
48             timeout: 60
49
50     wrappers:
51       - opendaylight-infra-wrappers:
52           build-timeout: '1440'
53
54     triggers:
55       - timed: '{cron}'
56
57     builders:
58       # force jenkins install of maven version before any shell scripts use it
59       - maven-target:
60           maven-version: 'mvn33'
61           goals: '-version'
62           settings: 'autorelease-settings'
63           settings-type: cfp
64           global-settings: 'odl-global-settings'
65           global-settings-type: cfp
66       - wipe-local-maven-repo
67       - jacoco-nojava-workaround
68       - shell: "./scripts/list-project-dependencies.sh"
69       - autorelease-determine-merge-order
70       - autorelease-cfp:
71           autorelease-settings: 'autorelease-settings'
72           odl-global-settings: 'odl-global-settings'
73       - autorelease-generate-taglist
74       - autorelease-distribute-taglist
75       - distribute-build-url:
76           path: 'integration/distribution/$KARAF_ARTIFACT/src/main/assembly'
77       - autorelease-generate-release-patches
78       # In a perfect world projects should be releasing separately and we consume them
79       # via a project that pulls the release bits from each project from Nexus.
80       # Keep the patches compatible with that ideal, but apply an edit
81       # to enable building in a single maven reactor afterwards.
82       - autorelease-fix-relative-paths
83       - maven-target:
84           maven-version: 'mvn33'
85           pom: 'pom.xml'
86           goals: |
87               clean deploy
88               -Pintegrationtests,docs,repoBuild
89               -Dcheckstyle.skip=true
90               -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage
91               {opendaylight-infra-mvn-opts}
92           java-opts:
93             - '-Xmx10g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
94           settings: 'autorelease-settings'
95           settings-type: cfp
96           global-settings: 'odl-global-settings'
97           global-settings-type: cfp
98       - autorelease-maven-deploy
99       - autorelease-get-integration-test-variables
100       - autorelease-maven-sources:
101           opendaylight-infra-mvn-opts: '{opendaylight-infra-mvn-opts}'
102           maven-version: 'mvn33'
103           settings: 'autorelease-settings'
104           global-settings: 'odl-global-settings'
105       - autorelease-maven-sources-post-process
106       - shell: |
107           mkdir -p archives/
108           cp *.log *.prop $_
109
110     publishers:
111       - opendaylight-infra-notify-status
112       - opendaylight-infra-sysstats
113       - archive:
114           # Need to archive dependencies.log in Jenkins to provide a simple
115           # way for downstream jobs to pull the latest version of this file
116           # in their builds.
117           # TODO stop archiving **/*.zip once we figure out why artifacts are
118           #      not deploying to Nexus
119           artifacts: 'dependencies.log, **/*.zip, /var/log/sa/*'
120       - trigger-parameterized-builds:
121           - project: 'autorelease-generate-release-notes-{stream}'
122             condition: UNSTABLE_OR_BETTER
123             property-file: variables.jenkins-trigger
124             fail-on-missing: true
125           - project: 'integration-distribution-test-{integration-test}'
126             condition: UNSTABLE_OR_BETTER
127             property-file: variables.jenkins-trigger
128             fail-on-missing: true
129           - project: 'integration-distribution-test-{integration-test}'
130             condition: FAILED
131             predefined-parameters: BUNDLE_URL=last
132           - project: 'integration-sanity-test-{integration-test}'
133             condition: UNSTABLE_OR_BETTER
134             property-file: variables.jenkins-trigger
135             fail-on-missing: true
136           - project: 'integration-sanity-test-{integration-test}'
137             condition: FAILED
138             predefined-parameters: BUNDLE_URL=last
139           - project: 'packaging-build-rpm-master'
140             condition: UNSTABLE_OR_BETTER
141             predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL
142             property-file: variables.jenkins-trigger
143             fail-on-missing: true
144       - opendaylight-infra-shiplogs:
145           maven-version: 'mvn33'
146
147
148 - job-template:
149     name: 'autorelease-generate-release-notes-{stream}'
150
151     project-type: freestyle
152     node: centos7-java-builder-2c-8g
153
154     properties:
155       - opendaylight-infra-properties:
156           build-days-to-keep: '{build-days-to-keep}'
157
158     parameters:
159       - opendaylight-infra-parameters:
160           os-cloud: '{os-cloud}'
161           project: '{project}'
162           branch: '{branch}'
163           refspec: 'refs/heads/{branch}'
164           artifacts: '{archive-artifacts}'
165
166     scm:
167       - git:
168           credentials-id: 'opendaylight-jenkins-ssh'
169           url: '$GIT_BASE'
170           refspec: '$GERRIT_REFSPEC'
171           branches:
172             - '$GERRIT_BRANCH'
173           choosing-strategy: 'gerrit'
174           skip-tag: true
175           submodule:
176             recursive: true
177
178     wrappers:
179       - opendaylight-infra-wrappers:
180           build-timeout: '30'
181
182     triggers:
183       - timed: '0 0 * * 0'
184
185     builders:
186       # force jenkins install of maven version before any shell scripts use it
187       - maven-target:
188           maven-version: 'mvn33'
189           goals: '-version'
190           settings: 'autorelease-settings'
191           settings-type: cfp
192           global-settings: 'odl-global-settings'
193           global-settings-type: cfp
194       - maven-target:
195           maven-version: 'mvn33'
196           pom: '$WORKSPACE/scripts/release_notes_management/pom.xml'
197           goals: |
198               clean package
199               -Dcheckstyle.skip=true
200               -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage
201               {opendaylight-infra-mvn-opts}
202           java-opts:
203             - '-Xmx10g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
204           settings: 'autorelease-settings'
205           settings-type: cfp
206           global-settings: 'odl-global-settings'
207           global-settings-type: cfp
208       - autorelease-generate-release-notes
209
210     publishers:
211       - opendaylight-infra-sysstats
212       - archive:
213           artifacts: 'scripts/release_notes_management/projects/release-notes.rst, /var/log/sa/*'
214       - opendaylight-infra-shiplogs:
215           maven-version: 'mvn33'