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")
|
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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue