summaryrefslogtreecommitdiffstats
path: root/jjb/releng
diff options
context:
space:
mode:
authorCristina Pauna <cristina.pauna@enea.com>2018-07-12 11:52:50 +0300
committerCristina Pauna <cristina.pauna@enea.com>2018-07-12 11:57:40 +0300
commit46a61e84fa16374a0973f57a78c6e512a048e15d (patch)
tree7efe2196a19c1c3a31885ae1a7cf5d292038ed13 /jjb/releng
parentbe49a5c9b7a9e1c5977f16eb84465b367277563f (diff)
Ensure docker prunning can be done
Sometimes the docker build fails and the docker process hangs on a container, withouth being able to stop it. This causes spurious failures on other builds that shouldn't fail. The prune job should cleanup the hanging containers and images, but it fails when the docker process is hanged. This change adds a docker restart to the prune job, in order to assure that the hanged container is shut down and can be removed. JIRA: ARMBAND-358 Change-Id: I9d04fa1099a6fc53bf773a2eba33be89db7d0aa1 Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
Diffstat (limited to 'jjb/releng')
-rw-r--r--jjb/releng/opnfv-utils.yaml1
1 files changed, 1 insertions, 0 deletions
diff --git a/jjb/releng/opnfv-utils.yaml b/jjb/releng/opnfv-utils.yaml
index 19fb4b5af..1d50eb44e 100644
--- a/jjb/releng/opnfv-utils.yaml
+++ b/jjb/releng/opnfv-utils.yaml
@@ -41,6 +41,7 @@
# yamllint disable rule:line-length
- shell: |
#!/bin/bash
+ sudo systemctl restart docker
(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