diff --git a/Jenkinsfile b/Jenkinsfile index 069b4394d..d85e65e01 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -171,16 +171,14 @@ pipeline { def cleanDockerE2E() { script { - // sh 'docker rm -f vn-database || true' - // sh 'docker rm -f salix_e2e || true' - // sh "docker-compose -p ${env.NETWORK} -f docker-compose.e2e.yml down --volumes || true" - // sh """ - // docker ps -a --format '{{.Names}}' | grep '${env.NETWORK}' | xargs -r docker-compose -p ${env.NETWORK} -f docker-compose.e2e.yml down --volumes - // """ + + + sh "docker ps -q --filter name=^${PROJECT_NAME}-${env.BRANCH_NAME}" def containers = sh(script: "docker ps -q --filter name=^${PROJECT_NAME}-${env.BRANCH_NAME}", returnStdout: true).trim() if (containers) { echo "${containers}" sh "docker stop ${containers}" + sh "docker rm ${containers}" } else { echo "No se encontraron redes para eliminar." }