This commit is contained in:
parent
7811e44d8b
commit
41bd5a424a
|
@ -94,31 +94,48 @@ pipeline {
|
|||
environment {
|
||||
CREDENTIALS = credentials('docker-registry')
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def packageJson = readJSON file: 'package.json'
|
||||
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
|
||||
stages {
|
||||
stage('Setup') {
|
||||
steps {
|
||||
script {
|
||||
def packageJson = readJSON file: 'package.json'
|
||||
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
|
||||
}
|
||||
sh 'rm -rf salix'
|
||||
sh 'git clone https://gitea.verdnatura.es/verdnatura/salix.git'
|
||||
}
|
||||
}
|
||||
stage('Up Database') {
|
||||
steps {
|
||||
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 run -d --name salix_e2e --net=host -v $(pwd)/test/cypress/storage:/salix/storage back'
|
||||
}
|
||||
}
|
||||
stage('Up Frontend') {
|
||||
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('Run E2E') {
|
||||
steps {
|
||||
sh 'docker-compose -f docker-compose.e2e.yml build e2e'
|
||||
sh 'docker-compose -f docker-compose.e2e.yml up e2e'
|
||||
}
|
||||
}
|
||||
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 {
|
||||
sh 'docker rm -f vn-database || true'
|
||||
sh 'docker rm -f salix_e2e || true'
|
||||
sh 'docker-compose -f docker-compose.e2e.yml down || true'
|
||||
|
||||
junit(
|
||||
testResults: 'junitresults.xml',
|
||||
allowEmptyResults: true
|
||||
|
@ -126,6 +143,7 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue