diff options
Diffstat (limited to 'jjb/opnfv')
-rw-r--r-- | jjb/opnfv/opnfv-docker.sh | 17 | ||||
-rw-r--r-- | jjb/opnfv/opnfv-docs.yml | 4 |
2 files changed, 9 insertions, 12 deletions
diff --git a/jjb/opnfv/opnfv-docker.sh b/jjb/opnfv/opnfv-docker.sh index 108485d0b..bf355973c 100644 --- a/jjb/opnfv/opnfv-docker.sh +++ b/jjb/opnfv/opnfv-docker.sh @@ -10,17 +10,12 @@ echo # Remove previous running containers if exist -if [[ ! -z $(docker ps -a | grep $DOCKER_REPO_NAME) ]]; then +if [[ -n "$(docker ps -a | grep $DOCKER_REPO_NAME)" ]]; then echo "Removing existing $DOCKER_REPO_NAME containers..." - #docker ps | grep $DOCKER_REPO_NAME | awk '{print $1}' | xargs docker stop docker ps -a | grep $DOCKER_REPO_NAME | awk '{print $1}' | xargs docker rm -f t=60 # Wait max 60 sec for containers to be removed - while [[ $t -gt 0 ]]; do - ids=$(docker ps | grep $DOCKER_REPO_NAME |awk '{print $1}') - if [[ -z $ids ]]; then - break - fi + while [[ $t -gt 0 ]] && [[ -n "$(docker ps| grep $DOCKER_REPO_NAME)" ]]; do sleep 1 let t=t-1 done @@ -28,13 +23,15 @@ fi # Remove existing images if exist -if [[ ! -z $(docker images | grep $DOCKER_REPO_NAME) ]]; then +if [[ -n "$(docker images | grep $DOCKER_REPO_NAME)" ]]; then echo "Docker images to remove:" docker images | head -1 && docker images | grep $DOCKER_REPO_NAME image_tags=($(docker images | grep $DOCKER_REPO_NAME | awk '{print $2}')) for tag in "${image_tags[@]}"; do - echo "Removing docker image $DOCKER_REPO_NAME:$tag..." - docker rmi -f $DOCKER_REPO_NAME:$tag + if [[ -n "$(docker images|grep $DOCKER_REPO_NAME|grep $tag)" ]]; then + echo "Removing docker image $DOCKER_REPO_NAME:$tag..." + docker rmi -f $DOCKER_REPO_NAME:$tag + fi done fi diff --git a/jjb/opnfv/opnfv-docs.yml b/jjb/opnfv/opnfv-docs.yml index 31f5d00fd..884b8b070 100644 --- a/jjb/opnfv/opnfv-docs.yml +++ b/jjb/opnfv/opnfv-docs.yml @@ -53,7 +53,7 @@ projects: - project-compare-type: 'REG_EXP' #Left out arno projects oscar|octopus|functest|genesis - project-pattern: 'vswitchperf|yardstick|apex|availability|bottlenecks|compass4nfv|conductor|copper|doctor|dovetail|dpacc|escalator|fastpathmetrics|fuel|inspector|ipv6|joid|kvmfornfv|lsoapi|moon|movie|multisite|onosfw|ovsnfv|parser|prediction|promise|qtip|releng|rs|sdnvpn|sfc|vnf_forwarding_graph|enfv|pinpoint|pharos|opnfvdocs|cperf|functest' + project-pattern: 'vswitchperf|yardstick|apex|availability|bottlenecks|compass4nfv|conductor|copper|doctor|dovetail|dpacc|escalator|fastpathmetrics|fuel|inspector|ipv6|joid|kvmfornfv|lsoapi|moon|movie|multisite|onosfw|ovsnfv|parser|prediction|promise|qtip|releng|rs|sdnvpn|sfc|vnf_forwarding_graph|enfv|pinpoint|pharos|cperf|functest' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' @@ -91,7 +91,7 @@ comment-contains-value: 'remerge' projects: - project-compare-type: 'REG_EXP' - project-pattern: 'vswitchperf|yardstick|apex|availability|bottlenecks|compass4nfv|conductor|copper|doctor|dovetail|dpacc|escalator|fastpathmetrics|fuel|inspector|ipv6|joid|kvmfornfv|lsoapi|moon|movie|multisite|onosfw|ovsnfv|parser|prediction|promise|qtip|releng|rs|sdnvpn|sfc|vnf_forwarding_graph|enfv|pinpoint|pharos|opnfvdocs|cperf|functest' + project-pattern: 'vswitchperf|yardstick|apex|availability|bottlenecks|compass4nfv|conductor|copper|doctor|dovetail|dpacc|escalator|fastpathmetrics|fuel|inspector|ipv6|joid|kvmfornfv|lsoapi|moon|movie|multisite|onosfw|ovsnfv|parser|prediction|promise|qtip|releng|rs|sdnvpn|sfc|vnf_forwarding_graph|enfv|pinpoint|pharos|cperf|functest' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' |