feat: refs #6695 better stages for e2e rollback
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
9f3a7aa452
commit
0724e768ee
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue