blob: 81d85fe5e9ec9a199069a22eba5850feb714e30c [file] [log] [blame]
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +00001#!/usr/bin/env bash
2
yanhuanwang4805f962019-09-11 20:44:10 +02003running_containers=$(docker ps --filter name=dfc_ -qa)
4running_images=$(docker images -q)
yanhuanwangf38c5ac2019-09-17 18:02:14 +02005docker exec dfc_app0 cat /var/log/ONAP/application.log >> $WORKSPACE/archives/dfc_app0_application.log
yanhuanwang459a6202019-09-13 14:19:05 +02006docker logs dfc_mr-sim >> $WORKSPACE/archives/dfc_mr-sim.log
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +00007
TamasBakaie81736c2019-08-23 13:31:57 +00008if [ -z "$running_containers" ]
9then
10 echo "No container requires termination"
11else
12 echo "Stopping and removing containers"
13 docker stop $running_containers
14 docker rm $running_containers
yanhuanwang4805f962019-09-11 20:44:10 +020015 docker rmi $running_images
TamasBakaie81736c2019-08-23 13:31:57 +000016fi
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +000017