feat: refs #6695 better stages for e2e rollback
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Alex Moreno 2025-01-31 10:28:32 +01:00
parent 9f3a7aa452
commit 0724e768ee
1 changed files with 20 additions and 40 deletions

60
Jenkinsfile vendored
View File

@ -73,47 +73,27 @@ pipeline {
environment {
CREDENTIALS = credentials('docker-registry')
}
stages {
// stage('Network') {
// steps {
// // sh "docker network rm e2e_default || true"
// // sh 'docker network create e2e_default || true'
// }
// }
stage('Setup') {
steps {
script {
def packageJson = readJSON file: 'package.json'
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
}
}
}
stage('DB') {
steps {
sh 'rm -rf salix'
sh 'git clone https://gitea.verdnatura.es/verdnatura/salix.git'
sh 'cd salix && pnpm i --prefer-offline @verdnatura/myt && npx myt run -t -d'
}
}
stage('Back') {
steps {
sh 'docker build -f ./salix/back/Dockerfile -t back ./salix'
sh 'docker run -d --name salix --net=host -v $(pwd)/test/cypress/storage:/salix/storage back'
}
}
stage('Front') {
steps {
sh 'quasar build'
sh 'docker-compose -f docker-compose.e2e.yml build front'
sh 'docker-compose -f docker-compose.e2e.yml up -d front'
}
}
stage('Test') {
steps {
sh 'docker-compose -f docker-compose.e2e.yml build e2e'
sh 'docker-compose -f docker-compose.e2e.yml up e2e'
}
steps {
script {
def packageJson = readJSON file: 'package.json'
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
}
// sh "docker network rm e2e_default || true"
// sh 'docker network create e2e_default || true'
sh 'rm -rf salix'
sh 'git clone https://gitea.verdnatura.es/verdnatura/salix.git'
// Db
sh 'cd salix && pnpm i --prefer-offline @verdnatura/myt && npx myt run -t -d'
// Backend
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'
// Frontend
sh 'quasar build'
sh 'docker-compose -f docker-compose.e2e.yml build front'
sh 'docker-compose -f docker-compose.e2e.yml up -d front'
// E2E
sh 'docker-compose -f docker-compose.e2e.yml build e2e'
sh 'docker-compose -f docker-compose.e2e.yml up e2e'
}
post {
always {