This commit is contained in:
Vicente Falco 2017-11-07 12:19:30 +01:00
parent 5a81fabc65
commit 17e9116b58
1 changed files with 3 additions and 9 deletions

12
Jenkinsfile vendored
View File

@ -25,21 +25,15 @@ node
} }
stage ("docker ${element}") stage ("docker")
{ {
stage ("Stopping ${prefixDocker}-${element} actual") stage ("Stopping ${prefixDocker}-${element} actual")
{ {
try try
{ {
def returnDocker = sh (script: "docker stop ${prefixDocker}-${element}", returnStdout: true).trim(); sh "docker-compose rm -s"
echo "${returnDocker}";
returnDocker = sh (script: "docker rm ${prefixDocker}-${element}", returnStdout: false).trim();
//echo "${returnDocker}";
returnDocker = sh (script: "docker rmi ${prefixDocker}-${element}:${buildNumber-3}", returnStdout: true).trim();
echo "borran ${prefixDocker}-${element}:${buildNumber-3}";
//echo "${returnDocker}";
}catch(Exception _){ }catch(Exception _){
echo "Error Stage Stopping" echo "Error Stopping/Removing dockers"
} }
} }