diff --git a/tests/API-dhcp/Jenkinsfile b/tests/API-dhcp/Jenkinsfile index c779e82..f08374d 100644 --- a/tests/API-dhcp/Jenkinsfile +++ b/tests/API-dhcp/Jenkinsfile @@ -43,20 +43,17 @@ pipeline { echo 'Running API tests' } } - stage('Clean up') { - steps { - dir ('tests/API-dhcp') { - echo "Destroy API server for DHCP with Vagrant" - // sh 'vagrant destroy -f' - } - } - } } post { + success { + script { + echo "El trabajo ha finalizado con éxito. Destruyendo máquina Vagrant..." + sh 'vagrant destroy -f' + } + } always { script { def userCause = currentBuild.rawBuild.getCause(hudson.model.Cause$UserIdCause) - if (userCause != null) { // Si fue lanzado manualmente, obtener el usuario y su correo desde las propiedades de Jenkins def userId = userCause.getUserId()