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")
{
try
{
def returnDocker = sh (script: "docker stop ${prefixDocker}-${element}", returnStdout: true).trim();
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}";
sh "docker-compose rm -s"
}catch(Exception _){
echo "Error Stage Stopping"
echo "Error Stopping/Removing dockers"
}
}