Merge "[iec] Publish logs to LF Nexus"
[ci-management.git] / jjb / akraino-templates / akraino-ta-common-templates.yaml
1 ---
2 - job-template:
3     id: akraino-project-stream-type-ta
4     name: '{project-name}-{stream}-{project-type}'
5     archive-artifacts: >
6       work/**/*.spec
7       work/**/*.repo
8       work/**/*.ini
9       work/**/*.cfg
10       work/**/*.log
11       work/**/*.txt
12       work/**/*.json
13       work/tmp/rpms/mock_config/**
14     build-days-to-keep: 30
15     build-timeout: 60
16     branch: master
17     stream: master
18     project-type: freestyle
19     submodule-recursive: true
20     node: '{build-node}'
21
22     properties:
23       - lf-infra-properties:
24           project: '{project}'
25           build-days-to-keep: '{build-days-to-keep}'
26
27     parameters:
28       - lf-infra-parameters:
29           project: '{project}'
30           stream: '{stream}'
31           branch: '{branch}'
32           lftools-version: '{lftools-version}'
33
34       - ta-parameters-ci
35
36       - string:
37           name: ARCHIVE_ARTIFACTS
38           default: '{archive-artifacts}'
39           description: Artifacts to archive to the logs server.
40
41     wrappers:
42       - lf-infra-wrappers:
43           build-timeout: '{build-timeout}'
44           jenkins-ssh-credential: '{jenkins-ssh-credential}'
45
46     scm:
47       - ta-lf-infra-gerrit-scm:
48           jenkins-ssh-credential: '{jenkins-ssh-credential}'
49           git-url: '{git-url}/{project}.git'
50           refspec: '$GERRIT_REFSPEC'
51           branch: '$GERRIT_BRANCH'
52           submodule-recursive: '{submodule-recursive}'
53           submodule-timeout: '{submodule-timeout}'
54           choosing-strategy: 'gerrit'
55           basedir: '$GERRIT_PROJECT'
56
57     triggers:
58       - ta-trigger-job-{project-type}:
59           gerrit-server-name: '{gerrit-server-name}'
60           project: '{project}'
61           branch: '{branch}'
62
63     builders:
64       - ta-builder-install-docker
65       - ta-builder-job-{project-type}:
66           git-url: '{git-url}'
67
68     publishers:
69       - ta-publisher-job-{project-type}
70
71 - job-template:
72     id: akraino-project-stream-type-ta-rpmbuilder
73     name: '{project-name}-{stream}-{project-type}'
74     archive-artifacts: >
75       work/**/*.spec
76       work/**/*.repo
77       work/**/*.ini
78       work/**/*.cfg
79       work/**/*.log
80       work/**/*.txt
81       work/**/*.json
82       work/tmp/rpms/mock_config/**
83     build-days-to-keep: 30
84     build-timeout: 60
85     branch: master
86     stream: master
87     project-type: freestyle
88     submodule-recursive: true
89     node: '{build-node}'
90
91     properties:
92       - lf-infra-properties:
93           project: '{project}'
94           build-days-to-keep: '{build-days-to-keep}'
95
96     parameters:
97       - lf-infra-parameters:
98           project: '{project}'
99           stream: '{stream}'
100           branch: '{branch}'
101           lftools-version: '{lftools-version}'
102
103       - ta-parameters-ci-{project-name}
104
105       - string:
106           name: ARCHIVE_ARTIFACTS
107           default: '{archive-artifacts}'
108           description: Artifacts to archive to the logs server.
109
110     wrappers:
111       - lf-infra-wrappers:
112           build-timeout: '{build-timeout}'
113           jenkins-ssh-credential: '{jenkins-ssh-credential}'
114
115     scm:
116       - ta-lf-infra-gerrit-scm:
117           jenkins-ssh-credential: '{jenkins-ssh-credential}'
118           git-url: '{git-url}/{project}.git'
119           refspec: '$GERRIT_REFSPEC'
120           branch: '$GERRIT_BRANCH'
121           submodule-recursive: '{submodule-recursive}'
122           submodule-timeout: '{submodule-timeout}'
123           choosing-strategy: 'gerrit'
124           basedir: '$GERRIT_PROJECT'
125
126     triggers:
127       - ta-trigger-job-{project-type}:
128           gerrit-server-name: '{gerrit-server-name}'
129           project: '{project}'
130           branch: '{branch}'
131
132     builders:
133       - ta-builder-job-{project-type}-{project-name}:
134           git-url: '{git-url}'
135
136     publishers:
137       - lf-infra-publish
138
139 - job-template:
140     id: akraino-project-stream-type-ta-build
141     name: '{project-name}-{stream}-{project-type}'
142     archive-artifacts: >
143       work/**/*.spec
144       work/**/*.repo
145       work/**/*.ini
146       work/**/*.cfg
147       work/**/*.log
148       work/**/*.txt
149       work/**/*.json
150       work/tmp/rpms/mock_config/**
151     build-days-to-keep: 30
152     build-timeout: 60
153     branch: master
154     stream: master
155     project-type: freestyle
156     submodule-recursive: true
157     node: '{build-node}'
158
159     properties:
160       - lf-infra-properties:
161           project: '{project}'
162           build-days-to-keep: '{build-days-to-keep}'
163
164     parameters:
165       - lf-infra-parameters:
166           project: '{project}'
167           stream: '{stream}'
168           branch: '{branch}'
169           lftools-version: '{lftools-version}'
170
171       - string:
172           name: ARCHIVE_ARTIFACTS
173           default: '{archive-artifacts}'
174           description: Artifacts to archive to the logs server.
175
176     wrappers:
177       - lf-infra-wrappers:
178           build-timeout: '{build-timeout}'
179           jenkins-ssh-credential: '{jenkins-ssh-credential}'
180
181     scm:
182       - ta-lf-infra-gerrit-scm:
183           jenkins-ssh-credential: '{jenkins-ssh-credential}'
184           git-url: '{git-url}/{project}.git'
185           refspec: '$GERRIT_REFSPEC'
186           branch: '$GERRIT_BRANCH'
187           submodule-recursive: '{submodule-recursive}'
188           submodule-timeout: '{submodule-timeout}'
189           choosing-strategy: 'gerrit'
190           basedir: '$GERRIT_PROJECT'
191
192     triggers:
193       - ta-trigger-job-{project-type}:
194           gerrit-server-name: '{gerrit-server-name}'
195           project: '{project}'
196           branch: '{branch}'
197
198     builders:
199       - ta-builder-tox
200       # TODO: verify ISO creation here
201
202     publishers:
203       - lf-infra-publish
204
205 - job-template:
206     # TODO: This is untested draft to start testing ISO build from
207     id: akraino-project-release-ta-build
208     name: 'ta-ci-build'
209     archive-artifacts: >
210       work/**/*.spec
211       work/**/*.repo
212       work/**/*.ini
213       work/**/*.cfg
214       work/**/*.log
215       work/**/*.txt
216       work/**/*.json
217     build-days-to-keep: 30
218     build-timeout: 60
219     branch: master
220     stream: master
221     project-type: freestyle
222     submodule-recursive: true
223     node: '{build-node}'
224
225     properties:
226       - lf-infra-properties:
227           project: '{project}'
228           build-days-to-keep: '{build-days-to-keep}'
229
230     parameters:
231       - lf-infra-parameters:
232           project: '{project}'
233           stream: '{stream}'
234           branch: '{branch}'
235           lftools-version: '{lftools-version}'
236
237       - ta-parameters-manifest
238       - ta-parameters-build-tools
239
240       - string:
241           name: ARCHIVE_ARTIFACTS
242           default: '{archive-artifacts}'
243           description: Artifacts to archive to the logs server.
244
245     wrappers:
246       - lf-infra-wrappers:
247           build-timeout: '{build-timeout}'
248           jenkins-ssh-credential: '{jenkins-ssh-credential}'
249
250     # TODO: define how it should be triggered
251     # Ideally should build whenever RPM is uploaded to nexus
252     triggers:
253       - timed: "@daily"
254
255     builders:
256       - ta-builder-scm:
257           git-url: '{git-url}'
258           project: 'ta/manifest'
259           ref: '$SCM_REFSPEC_MANIFEST'
260       - ta-builder-scm:
261           git-url: '{git-url}'
262           project: 'ta/build-tools'
263           ref: '$SCM_REFSPEC_BUILD_TOOLS'
264       - ta-builder-install-docker
265       - shell: |2-
266           sudo yum -y install createrepo
267           ta/build-tools/build_images.sh -m ta/manifest -w work
268           find work
269       - ta-lf-infra-ship-isos
270
271     publishers:
272       - lf-infra-publish