formation há 3 anos atrás
pai
commit
c21617e797
1 ficheiros alterados com 6 adições e 0 exclusões
  1. 6 0
      Jenkinsfile

+ 6 - 0
Jenkinsfile

@@ -12,6 +12,12 @@ node{
 		deleteDir()
 		checkout scm
 	}
+
+	 stage('Stop Containers')
+    {
+        sh 'docker ps | grep "workflow_" -v | awk -F " " \'{ if(NR>1) print $1}\' |xargs docker kill |xargs docker rm || true'
+        sh 'docker system prune -f'
+    }
 	 
 	// stage("Stop Preprod Container")
 	// {