Explorar o código

Modify always action in Jenkinsfile

Wadim Surkov %!s(int64=6) %!d(string=hai) anos
pai
achega
2ac536a45a
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      Jenkinsfile

+ 4 - 3
Jenkinsfile

@@ -119,11 +119,12 @@ pipeline {
   }
   post {
     always {
-      sh "docker stop ${CONTAINER_ID_CLIENT}"
-      sh "docker stop ${CONTAINER_ID_SERVER}"
-      sh "docker image rm ${DOCKER_IMAGE}:${SERIAL}"
       echo "CleaningUp work directory"
       deleteDir()
+      sh """docker stop ${CONTAINER_ID_CLIENT}
+            docker stop ${CONTAINER_ID_SERVER}
+            docker image rm ${DOCKER_IMAGE}:${SERIAL}
+         """
     }
     failure {
       mail charset: 'UTF-8',