Jenkins
This commit is contained in:
parent
5a81fabc65
commit
17e9116b58
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue