Merge "Increase test coverage for DEB env"
[releng/builder.git] / jjb / releng-jobs.yaml
1 ---
2 - project:
3     name: builder-jobs
4     jobs:
5       - '{project-name}-rtd-jobs':
6           project-pattern: releng/builder
7           rtd-build-url: https://readthedocs.org/api/v2/webhook/opendaylight-releng-builder/32926/
8           rtd-token: e9fa62bd60a39c22de631791309ccacc37a9929e
9       - gerrit-jenkins-cfg-merge:
10           jenkins-silos: releng sandbox
11       - gerrit-jenkins-sandbox-cleanup
12       - gerrit-jjb-deploy-job
13       - gerrit-jjb-merge:
14           build-node: centos7-builder-4c-4g
15           build-timeout: 90
16       - gerrit-jjb-verify
17       - builder-check-poms
18       - builder-copy-sandbox-logs
19       - builder-openstack-cron
20       - gerrit-tox-verify
21       # Automation for docs and jobs
22       - 'builder-update-image-list'
23
24     # The following values are only specified here
25     # so that code blocks look similar to other projects.
26     project: 'releng/builder'
27     project-name: builder
28     stream: master
29     branch: master
30     build-node: centos7-builder-2c-2g
31     archive-artifacts: '**/*.log'
32     build-timeout: 30
33     jjb-version: 2.2.1
34     jenkins-urls: >
35       https://jenkins.opendaylight.org/releng
36       https://jenkins.opendaylight.org/sandbox
37
38 - job-template:
39     name: builder-check-poms
40     node: centos7-builder-2c-1g
41
42     project-type: freestyle
43
44     properties:
45       - opendaylight-infra-properties:
46           build-days-to-keep: 14
47
48     parameters:
49       - opendaylight-infra-parameters:
50           os-cloud: '{os-cloud}'
51           project: '{project}'
52           branch: '{branch}'
53           refspec: 'refs/heads/{branch}'
54           artifacts: '{archive-artifacts}'
55
56     wrappers:
57       - opendaylight-infra-wrappers:
58           build-timeout: '{build-timeout}'
59
60     triggers:
61       - timed: 'H H * * 1'
62
63     builders:
64       - shell: !include-raw-escape: check-poms.sh
65
66     publishers:
67       - email-notification:
68           email-recipients: '{email-recipients}'
69           email-prefix: '[releng]'
70       - lf-infra-publish
71
72 - job-template:
73     name: builder-copy-sandbox-logs
74     node: centos7-builder-2c-1g
75
76     project-type: freestyle
77
78     properties:
79       - opendaylight-infra-properties:
80           build-days-to-keep: 1
81
82     parameters:
83       - opendaylight-infra-parameters:
84           os-cloud: ''
85           project: ''
86           branch: ''
87           refspec: ''
88           artifacts: ''
89
90     wrappers:
91       - opendaylight-infra-wrappers:
92           build-timeout: 10
93
94     triggers:
95       - gerrit:
96           server-name: '{gerrit-server-name}'
97           trigger-on:
98             - comment-added-contains-event:
99                 comment-contains-value: 'copy-logs:'
100           projects:
101             - project-compare-type: ANT
102               project-pattern: '**'
103               branches:
104                 - branch-compare-type: ANT
105                   branch-pattern: '**'
106
107     builders:
108       - shell: !include-raw-escape: copy-sandbox-logs.sh
109
110     publishers:
111       - lf-infra-publish
112
113
114 - job-template:
115     name: builder-openstack-cron
116     project-type: freestyle
117     node: '{build-node}'
118     concurrent: true
119
120     properties:
121       - lf-infra-properties:
122           build-days-to-keep: 7
123
124     parameters:
125       - lf-infra-parameters:
126           project: '{project}'
127           stream: '{stream}'
128           branch: '{branch}'
129           lftools-version: '{lftools-version}'
130       - string:
131           name: OS_CLOUD
132           default: '{os-cloud}'
133           description: |
134               The name of a cloud configuration in clouds.yaml. OS_CLOUD is a
135               variable name that is significant to openstack client as a
136               environment variable. Please refer to the documentation for
137               further details.
138               https://docs.openstack.org/developer/python-openstackclient/
139       - string:
140           name: ARCHIVE_ARTIFACTS
141           default: '{archive-artifacts}'
142           description: Artifacts to archive to the logs server.
143       - string:
144           name: JENKINS_URLS
145           default: '{jenkins-urls}'
146           description: 'Space separated list of Jenkins URLs to check for active builds'
147
148     scm:
149       - git-scm:
150           branch: '{branch}'
151
152     wrappers:
153       - lf-infra-wrappers:
154           build-timeout: '{build-timeout}'
155           jenkins-ssh-credential: '{jenkins-ssh-credential}'
156       # Listed after to override openstack-infra-wrappers clouds.yaml definition
157       - config-file-provider:
158           files:
159             - file-id: clouds-yaml
160               target: '$HOME/.config/openstack/clouds.yaml'
161             - file-id: npmrc
162               target: '$HOME/.npmrc'
163             - file-id: pipconf
164               target: '$HOME/.config/pip/pip.conf'
165
166     triggers:
167       - timed: '0,30 * * * *'
168
169     builders:
170       - lf-infra-pre-build
171       - shell: |
172           #!/bin/bash -l
173           pip install --user --upgrade lftools[openstack]~=0.17.1
174       # Servers
175       - odl-openstack-cleanup-stale-stacks
176       - odl-openstack-cleanup-stale-nodes
177       - odl-openstack-cleanup-orphaned-nodes
178       # Volumes
179       - odl-openstack-cleanup-stale-volumes
180       # Images
181       - odl-openstack-check-image-protection
182       - odl-openstack-cleanup-old-images
183
184     publishers:
185       - lf-infra-publish
186
187 - job-template:
188     name: 'builder-update-image-list'
189     project-type: freestyle
190     node: centos7-builder-2c-1g
191
192     properties:
193       - opendaylight-infra-properties:
194           build-days-to-keep: 7
195
196     parameters:
197       - opendaylight-infra-parameters:
198           os-cloud: vex
199           project: '{project}'
200           branch: '{branch}'
201           refspec: 'refs/heads/{branch}'
202           artifacts: '{archive-artifacts}'
203
204     scm:
205       - git-scm:
206           branch: '{branch}'
207
208     wrappers:
209       - opendaylight-infra-wrappers:
210           build-timeout: '{build-timeout}'
211       # Listed after to override openstack-infra-wrappers clouds.yaml definition
212       - config-file-provider:
213           files:
214             - file-id: clouds-yaml
215               target: '$HOME/.config/openstack/clouds.yaml'
216
217     triggers:
218       # Update image list every Monday to Friday at 11:00 UTC
219       - timed: '0 11 * * 1-5'
220
221     builders:
222       - shell: !include-raw-escape: opendaylight-infra-update-image-list.sh
223       - lf-infra-push-gerrit-patch:
224           project: '{project}'
225           gerrit-user: 'jenkins-$SILO'
226           gerrit-host: 'git.opendaylight.org'
227           gerrit-topic: 'releng-update-cloud-image-list'
228           gerrit-commit-message: 'Update cloud image list docs'
229           reviewers-email: 'jluhrsen@redhat.com'
230
231     publishers:
232       - email-notification:
233           email-recipients: '{email-recipients}'
234           email-prefix: '[releng]'
235       - lf-infra-publish