summaryrefslogtreecommitdiffstats
path: root/jjb/opnfv
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/opnfv')
-rw-r--r--jjb/opnfv/opnfv-docker.sh19
-rw-r--r--jjb/opnfv/opnfv-utils.yml40
2 files changed, 43 insertions, 16 deletions
diff --git a/jjb/opnfv/opnfv-docker.sh b/jjb/opnfv/opnfv-docker.sh
index f56de7f60..e637f7b32 100644
--- a/jjb/opnfv/opnfv-docker.sh
+++ b/jjb/opnfv/opnfv-docker.sh
@@ -67,22 +67,9 @@ fi
# cd to directory where Dockerfile is located
-if [[ "$DOCKER_REPO_NAME" == "opnfv/bottlenecks" ]]; then
- cd $WORKSPACE/ci/docker
-elif [[ "$DOCKER_REPO_NAME" == "opnfv/cperf" ]]; then
- cd $WORKSPACE/docker
-elif [[ "$DOCKER_REPO_NAME" == "opnfv/dovetail" ]]; then
- cd $WORKSPACE/docker
-elif [[ "$DOCKER_REPO_NAME" == "opnfv/functest" ]]; then
- cd $WORKSPACE/docker
-elif [[ "$DOCKER_REPO_NAME" == "opnfv/qtip" ]]; then
- cd $WORKSPACE/docker
-elif [[ "$DOCKER_REPO_NAME" == "opnfv/storperf" ]]; then
- cd $WORKSPACE/docker
-elif [[ "$DOCKER_REPO_NAME" == "opnfv/yardstick" ]]; then
- cd $WORKSPACE/tests/ci/docker/yardstick-ci
-else
- echo "ERROR: DOCKER_REPO_NAME parameter not valid: $DOCKER_REPO_NAME"
+cd $WORKSPACE/docker
+if [ ! -f ./Dockerfile ]; then
+ echo "ERROR: Dockerfile not found."
exit 1
fi
diff --git a/jjb/opnfv/opnfv-utils.yml b/jjb/opnfv/opnfv-utils.yml
new file mode 100644
index 000000000..94a99d451
--- /dev/null
+++ b/jjb/opnfv/opnfv-utils.yml
@@ -0,0 +1,40 @@
+- 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:
+ - description-setter:
+ description: "Built on $NODE_NAME"
+ - 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'