fix: refs #6695 try parallel
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
21e61a3213
commit
3de59d6fb8
|
@ -174,24 +174,20 @@ def cleanDockerE2E() {
|
||||||
|
|
||||||
|
|
||||||
sh "docker ps"
|
sh "docker ps"
|
||||||
sh "docker ps --filter name=^${PROJECT_NAME}-${env.BRANCH_NAME} -q"
|
def containers = sh(script: """
|
||||||
// def containers = sh(script: "docker ps -q --filter name=^${PROJECT_NAME}-${env.BRANCH_NAME}", returnStdout: true).trim()
|
docker ps --filter "name=^${PROJECT_NAME}-${env.BRANCH_NAME}" --format "{{.ID}}"
|
||||||
// if (containers) {
|
""", returnStdout: true).trim()
|
||||||
// echo "${containers}"
|
|
||||||
// sh "docker stop ${containers}"
|
|
||||||
// sh "docker rm ${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 (containers) {
|
||||||
// if (networks) {
|
echo "Contenedores encontrados: ${containers}"
|
||||||
// echo "${networks}"
|
|
||||||
// // sh "docker network rm ${networks}"
|
|
||||||
// } else {
|
|
||||||
// echo "No se encontraron redes para eliminar."
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
// Detener cada contenedor
|
||||||
|
sh(script: """
|
||||||
|
echo '${containers}' | xargs docker stop
|
||||||
|
""")
|
||||||
|
} else {
|
||||||
|
echo "No se encontraron contenedores con el prefijo '${PROJECT_NAME}-${env.BRANCH_NAME}'."
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue