Merge "Migrate int/dist to use lf-infra-publish"
[releng/builder.git] / jjb / integration / distribution / distribution-templates.yaml
1 ---
2 - project:
3     name: distribution-templates
4
5 - job-template:
6     name: '{project-name}-distribution-check-{stream}'
7     # Operation: This job template builds a patch, creates a distribution containing
8     #            the patch (making sure dependencies are specified),
9     #            and performs the distribution deploy test.
10     disabled: false
11
12     project-type: freestyle
13     node: '{build-node}'
14     concurrent: true
15     jdk: '{jdk}'
16
17     properties:
18       - opendaylight-infra-properties:
19           build-days-to-keep: '{build-days-to-keep}'
20
21     parameters:
22       - opendaylight-infra-parameters:
23           os-cloud: '{os-cloud}'
24           project: '{project}'
25           branch: '{branch}'
26           refspec: 'refs/heads/{branch}'
27           artifacts: '{archive-artifacts} **/dependency_tree.txt **/target/surefire-reports/*-output.txt'
28       - integration-distribution-git-url:
29           git-url: '{git-url}'
30       - distribution-karaf-version:
31           karaf-version: '{karaf-version}'
32       - maven-exec:
33           maven-version: mvn33
34
35     scm:
36       - integration-gerrit-scm:
37           basedir: '$GERRIT_PROJECT'
38           refspec: '$GERRIT_REFSPEC'
39           branch: '{branch}'
40       - integration-distribution-scm:
41           branch: '{distribution_branch}'
42
43     wrappers:
44       - opendaylight-infra-wrappers:
45           # Distro-check jobs typically run within 10 - 30 minutes
46           # with 45 minutes being the occassional edge case.
47           # enforce a 60 minute limit to ensure stuck jobs get
48           # cleared up sooner.
49           # Double that as Karaf 3+4 may take longer.
50           build-timeout: '120'
51
52     triggers:
53       - gerrit-trigger-patch-submitted:
54           server: '{server-name}'
55           project: '{project}'
56           branch: '{branch}'
57           files: '**'
58
59     builders:
60       - distribution-check-wipe
61       - distribution-check-build-project:
62           pom: '$GERRIT_PROJECT/pom.xml'
63           mvn-opts: '{opendaylight-infra-mvn-opts}'
64       - distribution-check-verify-groupid:
65           gerrit-project: '$GERRIT_PROJECT'
66       - distribution-check-download-deps:
67           dist-pom: 'distribution/pom.xml'
68           mvn-opts: '{opendaylight-infra-mvn-opts}'
69       - distribution-check-delete-snapshots
70       - distribution-check-configure-remotes
71       - distribution-check-repeat-build:
72           dist-pom: 'distribution/pom.xml'
73           mvn-opts: '{opendaylight-infra-mvn-opts}'
74       - integration-upload-distribution:
75           dist-pom: distribution/pom.xml
76       - integration-distribution-check
77
78     publishers:
79       - email-notification:
80           email-recipients: '{email-recipients}'
81           email-prefix: '[{project-name}]'
82       - postbuildscript:
83           builders:
84             - shell: |
85                 #!/bin/bash
86                 mkdir -p $WORKSPACE/archives
87                 cp karaf*.log $WORKSPACE/archives
88           script-only-if-succeeded: false
89           script-only-if-failed: false
90           mark-unstable-if-failed: true
91       - lf-infra-publish
92
93 # Delete these when Karaf 4 becomes Nitrogen default.
94
95 # TODO: Is there a way to de-duplicate with generic template parts?
96
97 - job-template:
98     name: '{project-name}-distribution3-check-nitrogen'
99     disabled: false
100
101     project-type: freestyle
102     node: '{build-node}'
103     concurrent: true
104     jdk: '{jdk}'
105
106     properties:
107       - opendaylight-infra-properties:
108           build-days-to-keep: '{build-days-to-keep}'
109
110     parameters:
111       - opendaylight-infra-parameters:
112           os-cloud: '{os-cloud}'
113           project: '{project}'
114           branch: 'master'
115           refspec: 'refs/heads/master'
116           artifacts: '{archive-artifacts} **/dependency_tree.txt **/target/surefire-reports/*-output.txt'
117       - integration-distribution-git-url:
118           git-url: '{git-url}'
119       - distribution-karaf-version:
120           karaf-version: karaf3
121       - maven-exec:
122           maven-version: mvn33
123
124     scm:
125       - integration-gerrit-scm:
126           basedir: '$GERRIT_PROJECT'
127           refspec: '$GERRIT_REFSPEC'
128           branch: '$GERRIT_BRANCH'
129       - integration-distribution-scm:
130           branch: 'master'
131
132     wrappers:
133       - opendaylight-infra-wrappers:
134           # Distro-check jobs typically run within 10 - 30 minutes
135           # with 45 minutes being the occassional edge case.
136           # enforce a 60 minute limit to ensure stuck jobs get
137           # cleared up sooner.
138           # Double that as Karaf 3+4 may take longer.
139           build-timeout: '120'
140
141     triggers:
142       - gerrit-trigger-patch-submitted:
143           server: '{server-name}'
144           project: '{project}'
145           branch: 'master'
146           files: '**'
147
148     builders:
149       - distribution-check-wipe
150       - distribution-check-build-project:
151           pom: '$GERRIT_PROJECT/pom.xml'
152           mvn-opts: '{opendaylight-infra-mvn-opts}'
153       - distribution-check-verify-groupid:
154           gerrit-project: '$GERRIT_PROJECT'
155       - distribution-check-download-deps:
156           dist-pom: 'distribution/pom.xml'
157           mvn-opts: '{opendaylight-infra-mvn-opts}'
158       - distribution-check-delete-snapshots
159       - distribution-check-configure-remotes
160       - distribution-check-repeat-build:
161           dist-pom: 'distribution/pom.xml'
162           mvn-opts: '{opendaylight-infra-mvn-opts}'
163       - integration-upload-distribution:
164           dist-pom: distribution/pom.xml
165       - integration-distribution-check
166
167     publishers:
168       - email-notification:
169           email-recipients: '{email-recipients}'
170           email-prefix: '[{project-name}]'
171       - postbuildscript:
172           builders:
173             - shell: |
174                 #!/bin/bash
175                 mkdir -p $WORKSPACE/archives
176                 cp karaf*.log $WORKSPACE/archives
177           script-only-if-succeeded: false
178           script-only-if-failed: false
179           mark-unstable-if-failed: true
180       - lf-infra-publish