summaryrefslogtreecommitdiffstats
path: root/jjb/opnfv/opnfv-utils.yml
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2016-09-30 00:21:10 +0200
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>2016-09-30 00:21:10 +0200
commit28b7e6b5f082c53b5b6132d3ec62d4b536089b0e (patch)
treee9c10d1d6113b11ce295fe8c4ca7f0584c524dca /jjb/opnfv/opnfv-utils.yml
parentf614c437d08f9ca32b8a2a09c1e989104782e35b (diff)
Prune docker images periodically from build servers
Change-Id: Id8712f5993fd15029fd833c9cf4e3000c940e84e Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
Diffstat (limited to 'jjb/opnfv/opnfv-utils.yml')
-rw-r--r--jjb/opnfv/opnfv-utils.yml38
1 files changed, 38 insertions, 0 deletions
diff --git a/jjb/opnfv/opnfv-utils.yml b/jjb/opnfv/opnfv-utils.yml
new file mode 100644
index 000000000..df7d14a16
--- /dev/null
+++ b/jjb/opnfv/opnfv-utils.yml
@@ -0,0 +1,38 @@
+- project:
+
+ name: opnfv-utils
+
+ jobs:
+ - 'prune-docker-images'
+########################
+# job templates
+########################
+- job-template:
+ name: 'prune-docker-images'
+
+ disabled: false
+
+ concurrent: true
+
+ parameters:
+ - node:
+ name: SLAVE_NAME
+ description: Slaves to prune docker images
+ default-slaves:
+ - arm-build1
+ - arm-build2
+ - ericsson-build4
+ - ericsson-build5
+ - lf-build2
+ allowed-multiselect: true
+ ignore-offline-nodes: true
+
+ builders:
+ - shell: |
+ #!/bin/bash
+
+ (docker ps -q; docker ps -aq) | sort | uniq -u | xargs --no-run-if-empty docker rm
+ docker images -f dangling=true -q | xargs --no-run-if-empty docker rmi
+
+ triggers:
+ - timed: '@midnight'