summaryrefslogtreecommitdiffstats
path: root/jjb/dovetail/dovetail-cleanup.sh
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2022-12-11 09:58:02 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2022-12-11 09:58:02 +0100
commitfc68d1fd7d6e64d9cdd1fb141c9923cca617fbf9 (patch)
tree8a498667dd07e565998b0003b22590b6700c890f /jjb/dovetail/dovetail-cleanup.sh
parent480bbef4fbe5b2ff73b1dccff4843357fc056e0c (diff)
Remove all Dovetail Jenkins Jobs
They haven't been executed for a while and the project is inactive. We will revert them if Dovetail is back to active. Change-Id: Ia5e5d65b40ad414863974f115a8e1bf07493ea28 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'jjb/dovetail/dovetail-cleanup.sh')
-rwxr-xr-xjjb/dovetail/dovetail-cleanup.sh49
1 files changed, 0 insertions, 49 deletions
diff --git a/jjb/dovetail/dovetail-cleanup.sh b/jjb/dovetail/dovetail-cleanup.sh
deleted file mode 100755
index 2d66fe022..000000000
--- a/jjb/dovetail/dovetail-cleanup.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
-
-# clean up dependent project docker images, which has no containers and image tag None
-clean_images=(opnfv/functest opnfv/yardstick opnfv/testapi mongo)
-for clean_image in "${clean_images[@]}"; do
- dangling_images=($(docker images -f "dangling=true" | grep ${clean_image} | awk '{print $3}'))
- if [[ -n ${dangling_images} ]]; then
- for image_id in "${dangling_images[@]}"; do
- echo "Removing image $image_id, which has no containers and image tag is None"
- docker rmi $image_id >${redirect}
- done
- fi
-done
-
-echo "Remove dovetail images with tag None and containers with these images ..."
-dangling_images=($(docker images -f "dangling=true" | grep opnfv/dovetail | awk '{print $3}'))
-if [[ -n ${dangling_images} ]]; then
- for image_id in "${dangling_images[@]}"; do
- echo "Removing image $image_id with tag None and its related containers"
- docker ps -a | grep $image_id | awk '{print $1}'| xargs docker rm -f >${redirect}
- docker rmi $image_id >${redirect}
- done
-fi
-
-echo "Cleaning up dovetail docker containers..."
-if [[ ! -z $(docker ps -a | grep opnfv/dovetail) ]]; then
- echo "Removing existing opnfv/dovetail containers..."
- docker ps -a | grep opnfv/dovetail | awk '{print $1}' | xargs docker rm -f >${redirect}
-fi
-
-#echo "Remove dovetail existing images if exist..."
-#if [[ ! -z $(docker images | grep opnfv/dovetail) ]]; then
-# echo "Docker images to remove:"
-# docker images | head -1 && docker images | grep opnfv/dovetail >${redirect}
-# image_tags=($(docker images | grep opnfv/dovetail | awk '{print $2}'))
-# for tag in "${image_tags[@]}"; do
-# echo "Removing docker image opnfv/dovetail:$tag..."
-# docker rmi opnfv/dovetail:$tag >${redirect}
-# done
-#fi