From 28b7e6b5f082c53b5b6132d3ec62d4b536089b0e Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Fri, 30 Sep 2016 00:21:10 +0200 Subject: Prune docker images periodically from build servers Change-Id: Id8712f5993fd15029fd833c9cf4e3000c940e84e Signed-off-by: Fatih Degirmenci --- jjb/opnfv/opnfv-utils.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 jjb/opnfv/opnfv-utils.yml (limited to 'jjb/opnfv') 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' -- cgit 1.2.3-korg