diff --git a/Jenkinsfile b/Jenkinsfile index 8767a1150..3ffa98394 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -41,10 +41,27 @@ pipeline { environment { NODE_ENV = "" } - steps { - nodejs('node-v20') { - sh 'npm install --no-audit --prefer-offline' - sh 'gulp install --ci' + parallel { + stage('Backend') { + steps { + nodejs('node-v20') { + sh 'npm install --no-audit --prefer-offline' + } + } + } + stage('Frontend') { + steps { + nodejs('node-v20') { + sh 'npm install --no-audit --prefer-offline --prefix=front' + } + } + } + stage('Print') { + steps { + nodejs('node-v20') { + sh 'npm install --no-audit --prefer-offline --prefix=print' + } + } } } } @@ -61,13 +78,6 @@ pipeline { TZ = 'Europe/Madrid' } parallel { - stage('Frontend') { - steps { - nodejs('node-v20') { - sh 'jest --ci --reporters=default --reporters=jest-junit --maxWorkers=6' - } - } - } stage('Backend') { steps { nodejs('node-v20') { @@ -75,6 +85,13 @@ pipeline { } } } + stage('Frontend') { + steps { + nodejs('node-v20') { + sh 'jest --ci --reporters=default --reporters=jest-junit --maxWorkers=6' + } + } + } } } stage('Build') { @@ -98,21 +115,6 @@ pipeline { } stage('Deploy') { parallel { - stage('Docker') { - when { - environment name: 'RUN_SOURCE', value: 'git' - anyOf { - branch 'test' - branch 'master' - } - } - environment { - DOCKER_HOST = "${env.SWARM_HOST}" - } - steps { - sh "docker stack deploy --with-registry-auth --compose-file docker-compose.yml ${env.STACK_NAME}" - } - } stage('Database') { when { anyOf { branch 'dev' @@ -132,6 +134,21 @@ pipeline { } } } + stage('Docker') { + when { + environment name: 'RUN_SOURCE', value: 'git' + anyOf { + branch 'test' + branch 'master' + } + } + environment { + DOCKER_HOST = "${env.SWARM_HOST}" + } + steps { + sh "docker stack deploy --with-registry-auth --compose-file docker-compose.yml ${env.STACK_NAME}" + } + } } } }