blob: eaebbc24f44eef6f7972bf5ea0fed2d95559c242 [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)
yanhuanwang459a6202019-09-13 14:19:05 +02005docker exec -it dfc_app0 cat /var/log/ONAP/application.log >> $WORKSPACE/archives/dfc_app0_application.log
6docker 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