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