summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2016-10-03 09:09:33 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-10-03 09:09:33 +0000
commitcb4e7ebef51b73914f8c6f554c4c3db742aa0787 (patch)
tree3bb44de51406797929be2f36a6c44fd579d84dd9 /jjb
parent609bf2f9c9c6885b0a1c6acf292e33d80bf1c3f7 (diff)
parent28b7e6b5f082c53b5b6132d3ec62d4b536089b0e (diff)
Merge "Prune docker images periodically from build servers"
Diffstat (limited to 'jjb')
-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'