8714-devToTest #1547

Merged
alexm merged 712 commits from 8714-devToTest into test 2025-03-04 14:08:01 +00:00
1 changed files with 8 additions and 3 deletions
Showing only changes of commit 6b67ac7762 - Show all commits

11
Jenkinsfile vendored
View File

@ -177,13 +177,18 @@ def cleanDockerE2E() {
// 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}"
sh "(docker ps -q --filter name=^${PROJECT_NAME}-${env.BRANCH_NAME} | xargs -r docker stop) || true"
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}"
} else {
echo "No se encontraron redes para eliminar."
}
def networks = sh(script: "docker network ls --filter name=^${PROJECT_NAME}-${env.BRANCH_NAME} -q", returnStdout: true).trim()
if (networks) {
sh "docker network rm ${networks}"
echo "${networks}"
sh "docker network rm ${networks}"
} else {
echo "No se encontraron redes para eliminar."
}