ci: refs #6695 streamline Cypress E2E test execution in Jenkinsfile and improve error handling
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
a8a36b6f6f
commit
e5fe743e0e
|
@ -112,13 +112,13 @@ pipeline {
|
||||||
script {
|
script {
|
||||||
sh "docker-compose -p ${env.NETWORK} -f docker-compose.e2e.yml up -d"
|
sh "docker-compose -p ${env.NETWORK} -f docker-compose.e2e.yml up -d"
|
||||||
def containerId = sh(script: """
|
def containerId = sh(script: """
|
||||||
docker run --network \${env.NETWORK}_e2e-network \\
|
docker run --network \${env.NETWORK}_e2e-network \
|
||||||
-e TZ=Europe/Madrid \\
|
-e TZ=Europe/Madrid \
|
||||||
-e DOCKER=true \\
|
-e DOCKER=true \
|
||||||
-e CI=true \\
|
-e CI=true \
|
||||||
-v \$(pwd):/app \\
|
-v \\\$(pwd):/app \
|
||||||
-w /app \\
|
-w /app \
|
||||||
cypress-setup:latest \\
|
cypress-setup:latest \
|
||||||
sh -c "while [ ! -d node_modules/cypress ]; do sleep 1; done && pnpm exec cypress run --browser chromium"
|
sh -c "while [ ! -d node_modules/cypress ]; do sleep 1; done && pnpm exec cypress run --browser chromium"
|
||||||
""", returnStdout: true).trim()
|
""", returnStdout: true).trim()
|
||||||
checkErrors(containerId)}
|
checkErrors(containerId)}
|
||||||
|
@ -171,9 +171,9 @@ pipeline {
|
||||||
def cleanDockerE2E() {
|
def cleanDockerE2E() {
|
||||||
script {
|
script {
|
||||||
sh "docker-compose -p ${env.NETWORK} -f docker-compose.e2e.yml down || true"
|
sh "docker-compose -p ${env.NETWORK} -f docker-compose.e2e.yml down || true"
|
||||||
// if (containerId) {
|
if (containerId) {
|
||||||
// sh "docker rm ${containerId} || true"
|
sh "docker rm ${containerId} || true"
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue