ci: refs #6695 update Cypress Docker setup and improve container management in Jenkinsfile
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2025-02-19 09:11:52 +01:00
parent 5f5ef3df41
commit 4d058e09da
1 changed files with 2 additions and 2 deletions

4
Jenkinsfile vendored
View File

@ -100,7 +100,7 @@ pipeline {
def packageJson = readJSON file: 'package.json'
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
env.NETWORK = "${PROJECT_NAME}-${env.BRANCH_NAME}-${env.BUILD_ID}"
cleanDockerE2E()
cleanDockerE2E(containerId)
sh "pnpm exec cypress install"
// sh "docker build -t cypress-setup:latest -f ./test/cypress/Dockerfile ."
docker.build('cypress-setup:latest', "-f ./test/cypress/Dockerfile .")
@ -172,7 +172,7 @@ pipeline {
}
}
def cleanDockerE2E() {
def cleanDockerE2E(String containerId = null) {
script {
sh "docker-compose -p ${env.NETWORK} -f docker-compose.e2e.yml down || true"
if (containerId?.trim()) {