fix: refs #8698 update Jenkinsfile to skip Cypress execution if no modules have changed
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Alex Moreno 2025-03-05 13:28:08 +01:00
parent 27d7a732b7
commit 4ee8c80340
1 changed files with 6 additions and 1 deletions

7
Jenkinsfile vendored
View File

@ -118,10 +118,15 @@ pipeline {
withDockerRegistry([credentialsId: 'docker-registry', url: "https://${env.REGISTRY}" ]) {
sh "docker-compose ${env.COMPOSE_PARAMS} up -d"
}
def modules = sh(script: 'node test/cypress/docker/find/find.js', returnStdout: true).trim()
if (modules == "") {
echo "No modules changed. Skipping execution"
return
}
def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs')
sh "docker-compose ${env.COMPOSE_PARAMS} up -d"
def modules = sh(script: 'node test/cypress/docker/find/find.js', returnStdout: true).trim()
image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ") {
sh "cypress run --browser chromium --spec '${modules}' || true"
}