diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2016-04-25 16:53:53 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-04-25 16:53:53 +0000 |
commit | b757e1a1037ebfcd95d39bbf1df046b177205722 (patch) | |
tree | 287e6ecf84ef991a43710cfa74707ece022a787b /jjb | |
parent | cac634f7fb9cf6ecbb4169589021ecb3c2492976 (diff) | |
parent | 869b61e937862b1070ab3b5789a7c23a7992e94d (diff) |
Merge "Avoid colissions between docker-build jobs"
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/opnfv/opnfv-docker.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jjb/opnfv/opnfv-docker.sh b/jjb/opnfv/opnfv-docker.sh index 8f44268e6..702c0ce52 100644 --- a/jjb/opnfv/opnfv-docker.sh +++ b/jjb/opnfv/opnfv-docker.sh @@ -17,6 +17,14 @@ echo "--------------------------------------------------------" echo +if [[ -n $(ps -ef|grep 'docker build'|grep -v grep) ]]; then + echo "There is already another build process in progress:" + echo $(ps -ef|grep 'docker build'|grep -v grep) + # Abort this job since it will colide and might mess up the current one. + echo "Aborting..." + exit 1 +fi + # Remove previous running containers if exist if [[ -n "$(docker ps -a | grep $DOCKER_REPO_NAME)" ]]; then echo "Removing existing $DOCKER_REPO_NAME containers..." |