Merge "Distribution test optimization"
[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           os-cloud: '{os-cloud}'
20           project: '{project}'
21           branch: '{branch}'
22           refspec: 'refs/heads/{branch}'
23           artifacts: '{archive-artifacts}'
24       - autorelease-release-tag:
25           release-tag: '{next-release-tag}'
26       - autorelease-release-branch:
27           release-branch: '{branch}'
28
29     scm:
30       - git:
31           credentials-id: 'opendaylight-jenkins-ssh'
32           url: '$GIT_BASE'
33           refspec: '$GERRIT_REFSPEC'
34           branches:
35             - '$GERRIT_BRANCH'
36           choosing-strategy: 'gerrit'
37           skip-tag: true
38           submodule:
39             recursive: true
40             timeout: 60
41
42     wrappers:
43       - opendaylight-infra-wrappers:
44           build-timeout: '1440'
45
46     triggers:
47       - timed: '{cron}'
48
49     builders:
50       # force jenkins install of maven version before any shell scripts use it
51       - maven-target:
52           maven-version: 'mvn33'
53           goals: '-version'
54           settings: 'autorelease-settings'
55           settings-type: cfp
56           global-settings: 'odl-global-settings'
57           global-settings-type: cfp
58       - wipe-local-maven-repo
59       - jacoco-nojava-workaround
60       - shell: "./scripts/list-project-dependencies.sh"
61       - autorelease-determine-merge-order
62       - autorelease-cfp:
63           autorelease-settings: 'autorelease-settings'
64           odl-global-settings: 'odl-global-settings'
65       - autorelease-generate-taglist
66       - autorelease-distribute-taglist
67       - distribute-build-url:
68           path: 'integration/distribution/distribution-karaf/src/main/assembly'
69       - autorelease-generate-release-patches
70       # In a perfect world projects should be releasing separately and we consume them
71       # via a project that pulls the release bits from each project from Nexus.
72       # Keep the patches compatible with that ideal, but apply an edit
73       # to enable building in a single maven reactor afterwards.
74       - autorelease-fix-relative-paths
75       - maven-target:
76           maven-version: 'mvn33'
77           pom: 'pom.xml'
78           goals: |
79               clean deploy
80               -Pintegrationtests,docs,repoBuild
81               -Dcheckstyle.skip=true
82               -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage
83               {opendaylight-infra-mvn-opts}
84           java-opts:
85             - '-Xmx10g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
86           settings: 'autorelease-settings'
87           settings-type: cfp
88           global-settings: 'odl-global-settings'
89           global-settings-type: cfp
90       - autorelease-maven-deploy
91       - autorelease-get-integration-test-variables
92       - autorelease-maven-sources:
93           opendaylight-infra-mvn-opts: '{opendaylight-infra-mvn-opts}'
94           maven-version: 'mvn33'
95           settings: 'autorelease-settings'
96           global-settings: 'odl-global-settings'
97       - autorelease-maven-sources-post-process
98       - autorelease-sys-stats
99       - shell: |
100           mkdir -p archives/
101           cp *.log *.prop $_
102
103     publishers:
104       - opendaylight-infra-notify-status
105       - archive:
106           # Need to archive dependencies.log in Jenkins to provide a simple
107           # way for downstream jobs to pull the latest version of this file
108           # in their builds.
109           artifacts: 'dependencies.log'
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: 'integration-distribution-test-{integration-test}'
116             condition: FAILED
117           - project: 'packaging-build-rpm-master'
118             condition: UNSTABLE_OR_BETTER
119             predefined-parameters: DOWNLOAD_URL=$BUNDLEURL
120             property-file: variables.jenkins-trigger
121             fail-on-missing: true
122       - opendaylight-infra-shiplogs:
123           maven-version: 'mvn33'