From 05994ba1dc23abba33a1360022871030aae4331b Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 21 Feb 2025 14:52:12 +0100 Subject: [PATCH] ci: refs #6695 remove unnecessary echo statements from Jenkinsfile --- Jenkinsfile | 101 ++++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 51 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2f3012f8d..07c6a9bd8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,7 +20,6 @@ node { PROTECTED_BRANCH = GIT_PROTECTED_BRANCH + ['main','beta'] TARGET_BRANCH = GIT_PROTECTED_BRANCH.find { it == env.CHANGE_TARGET } ?: "dev" - echo TARGET_BRANCH IS_PROTECTED_BRANCH = PROTECTED_BRANCH.contains(env.BRANCH_NAME) IS_LATEST = ['master', 'main'].contains(env.BRANCH_NAME) @@ -80,56 +79,56 @@ pipeline { sh 'pnpm install --prefer-offline' } } - // stage('Test') { - // when { - // expression { !IS_PROTECTED_BRANCH } - // } - // environment { - // NODE_ENV = '' - // CI = 'true' - // TZ = 'Europe/Madrid' - // } - // parallel { - // stage('Unit') { - // steps { - // sh 'pnpm run test:unit:ci' - // } - // post { - // always { - // junit( - // testResults: 'junit/vitest.xml', - // allowEmptyResults: true - // ) - // } - // } - // } - // stage('E2E') { - // environment { - // CREDENTIALS = credentials('docker-registry') - // COMPOSE_PROJECT = "${PROJECT_NAME}-${env.BUILD_ID}" - // COMPOSE_PARAMS = "-p ${env.COMPOSE_PROJECT} -f test/cypress/docker-compose.yml --project-directory ." - // } - // steps { - // script { - // def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs') - // sh "docker-compose ${env.COMPOSE_PARAMS} up -d" - // image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ") { - // sh 'cypress run --browser chromium' - // } - // } - // } - // post { - // always { - // sh "docker-compose ${env.COMPOSE_PARAMS} down" - // junit( - // testResults: 'junit/e2e.xml', - // allowEmptyResults: true - // ) - // } - // } - // } - // } - // } + stage('Test') { + when { + expression { !IS_PROTECTED_BRANCH } + } + environment { + NODE_ENV = '' + CI = 'true' + TZ = 'Europe/Madrid' + } + parallel { + stage('Unit') { + steps { + sh 'pnpm run test:unit:ci' + } + post { + always { + junit( + testResults: 'junit/vitest.xml', + allowEmptyResults: true + ) + } + } + } + stage('E2E') { + environment { + CREDENTIALS = credentials('docker-registry') + COMPOSE_PROJECT = "${PROJECT_NAME}-${env.BUILD_ID}" + COMPOSE_PARAMS = "-p ${env.COMPOSE_PROJECT} -f test/cypress/docker-compose.yml --project-directory ." + } + steps { + script { + def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs') + sh "docker-compose ${env.COMPOSE_PARAMS} up -d" + image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ") { + sh 'cypress run --browser chromium' + } + } + } + post { + always { + sh "docker-compose ${env.COMPOSE_PARAMS} down -v" + junit( + testResults: 'junit/e2e.xml', + allowEmptyResults: true + ) + } + } + } + } + } stage('Build') { when { expression { IS_PROTECTED_BRANCH }