test: refs #6695 back and front in parallel
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Alex Moreno 2025-01-31 14:50:03 +01:00
parent 930da78f6c
commit 900b76a4db
1 changed files with 46 additions and 53 deletions

21
Jenkinsfile vendored
View File

@ -66,15 +66,13 @@ pipeline {
sh 'pnpm install --prefer-offline' sh 'pnpm install --prefer-offline'
} }
} }
stage('Test') { stage('Test: Unit') {
when { when {
expression { !PROTECTED_BRANCH } expression { !PROTECTED_BRANCH }
} }
environment { environment {
NODE_ENV = "" NODE_ENV = ""
} }
parallel{
stage('Unit') {
steps { steps {
sh 'pnpm run test:unit:ci' sh 'pnpm run test:unit:ci'
} }
@ -106,22 +104,22 @@ pipeline {
sh 'git clone https://gitea.verdnatura.es/verdnatura/salix.git' sh 'git clone https://gitea.verdnatura.es/verdnatura/salix.git'
} }
} }
stage('Up Database') { stage('Up') {
parallel {
stage('Database & Backend') {
steps { steps {
sh 'cd salix && pnpm i --prefer-offline @verdnatura/myt && npx myt run -t -d' sh 'cd salix && pnpm i --prefer-offline @verdnatura/myt && npx myt run -t -d'
}
}
stage('Up Backend') {
steps {
sh 'docker build -f ./salix/back/Dockerfile -t back ./salix' sh 'docker build -f ./salix/back/Dockerfile -t back ./salix'
sh 'docker run -d --name salix_e2e --net=host -v $(pwd)/test/cypress/storage:/salix/storage back' sh 'docker run -d --name salix_e2e --net=host -v $(pwd)/test/cypress/storage:/salix/storage back'
} }
} }
stage('Up Frontend') { stage('Frontend') {
steps { steps {
sh 'docker-compose -f docker-compose.e2e.yml up -d --build front' sh 'docker-compose -f docker-compose.e2e.yml up -d --build front'
} }
} }
}
}
stage('Run E2E') { stage('Run E2E') {
steps { steps {
sh 'docker-compose -f docker-compose.e2e.yml up e2e' sh 'docker-compose -f docker-compose.e2e.yml up e2e'
@ -138,11 +136,6 @@ pipeline {
} }
} }
} }
}
}
stage('Build') { stage('Build') {
when { when {
expression { PROTECTED_BRANCH } expression { PROTECTED_BRANCH }