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

34
Jenkinsfile vendored
View File

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