# limitations under the License.
#
# Modifications copyright (c) 2018 AT&T Intellectual Property
+# Modifications copyright (C) 2022 highstreet technologies GmbH Intellectual Property
#
if [[ -z $WORKSPACE ]]; then
env_file="--env-file ${SCRIPTS}/sdnr/docker-compose/.env"
function sdnr_teardown() {
- running_containers=$(docker ps -aq)
+ running_containers=$(docker ps -a --format "{{.Names}}")
if [ -z "$running_containers" ]
then
echo "No containers to get logs from!"
echo "Getting logs from container $i"
docker logs $i >> ${WORKSPACE}/archives/getallinfo/$i.log 2>&1
done
+ docker cp sdnr:/opt/opendaylight/data/log/karaf.log ${WORKSPACE}/archives/getallinfo/sdnr_karaf.log
+ docker cp sdnr:/opt/opendaylight/data/log/installCerts.log ${WORKSPACE}/archives/getallinfo/sdnr_installCerts.log
+ docker cp sdnr:/opt/opendaylight/etc/custom.properties ${WORKSPACE}/archives/getallinfo/sdnr_custom_properties.log
fi
echo "Starting teardown!"
# removes sdnrdb, sdnr AND all of the rest of the containers (--remove-orphans)