Merge "Email a monthly repo archives link to OPNFV Legal"
[releng.git] / jjb / releng / opnfv-utils.yml
1 ---
2 - project:
3
4     name: opnfv-utils
5
6     jobs:
7       - 'prune-docker-images'
8       - 'archive-repositories'
9       - 'check-status-of-slaves'
10
11 ########################
12 # job templates
13 ########################
14 - job-template:
15     name: 'prune-docker-images'
16
17     disabled: false
18
19     concurrent: true
20
21     parameters:
22       - node:
23           name: SLAVE_NAME
24           description: Slaves to prune docker images
25           default-slaves:
26             - arm-build2
27             - ericsson-build3
28             - ericsson-build4
29             - lf-build2
30           allowed-multiselect: true
31           ignore-offline-nodes: true
32
33     builders:
34       - description-setter:
35           description: "Built on $NODE_NAME"
36       - shell: |
37           #!/bin/bash
38
39           (docker ps -q; docker ps -aq) | sort | uniq -u | xargs --no-run-if-empty docker rm
40           docker images -f dangling=true -q | xargs --no-run-if-empty docker rmi
41
42     triggers:
43       - timed: '@midnight'
44
45 - job-template:
46     name: 'archive-repositories'
47
48     disabled: false
49
50     concurrent: true
51
52     parameters:
53       - node:
54           name: SLAVE_NAME
55           description: Where to create the archive
56           default-slaves:
57             - master
58           allowed-multiselect: false
59           ignore-offline-nodes: true
60
61     triggers:
62       - timed: '@monthly'
63
64     builders:
65       - shell:
66           !include-raw-escape: opnfv-repo-archiver.sh
67
68     publishers:
69       - email-ext:
70           content-type: 'text'
71           failure: false
72           always: true
73           body:
74             ${{FILE,path="archive-link.txt"}}
75           reply-to: >
76             helpdesk@opnfv.org
77           recipients: >
78             swinslow@linuxfoundation.org
79
80
81 - job-template:
82     name: 'check-status-of-slaves'
83
84     disabled: false
85
86     concurrent: true
87
88     parameters:
89       - node:
90           name: SLAVE_NAME
91           description: We don't want workspace wiped. so I just threw the script on the master
92           default-slaves:
93             - master
94           allowed-multiselect: false
95           ignore-offline-nodes: true
96
97     triggers:
98       - timed: '@midnight'
99
100     builders:
101       - shell: |
102           cd /opt/jenkins-ci/slavemonitor
103           bash slave-monitor-0.1.sh | sort