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