refs #5739 feat: docker test back
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2024-01-08 14:45:29 +01:00
parent 06f1781b43
commit 593b58134e
4 changed files with 23 additions and 9 deletions

25
Jenkinsfile vendored
View File

@ -52,11 +52,11 @@ pipeline {
TZ = 'Europe/Madrid'
}
parallel {
stage('Frontend') {
steps {
sh "docker-compose -p salix-test -f docker-compose.test.yml run --rm front"
}
}
// stage('Frontend') {
// steps {
// sh "docker-compose -p salix-test -f docker-compose.test.yml run --rm front"
// }
// }
stage('Backend') {
steps {
sh "docker-compose -p salix-test -f docker-compose.test.yml run --rm back"
@ -64,6 +64,21 @@ pipeline {
}
}
}
stage('ClearTest') {
when { not { anyOf {
branch 'test'
branch 'master'
}}}
environment {
NODE_ENV = ""
TZ = 'Europe/Madrid'
}
steps {
sh "docker-compose -p salix-test -f docker-compose.test.yml down"
sh "docker-compose -p salix-test -f docker-compose.test.yml run --rm back"
// sh "docker-compose -p salix-test -f docker-compose.test.yml run --rm front"
}
}
stage('Build') {
when { anyOf {
branch 'test'

View File

@ -57,4 +57,4 @@ COPY print print
COPY storage storage
# CMD ["npx", "gulp", "backOnly"]
CMD ["npm", "run", "test:back:ci"]
CMD ["node", "back/tests.js", "ci"]

View File

@ -108,10 +108,9 @@
},
"scripts": {
"dbtest": "nodemon -q db/tests.js -w db/tests",
"test:back": "sh back/runTestBack.sh",
"test:back:ci": "sh back/runTestBack.sh",
"test:back": "sh runTestBack.sh",
"test:e2e": "node e2e/helpers/tests.js",
"test:front": "sh front/runTestFront.sh",
"test:front": "sh runTestFront.sh",
"test:front:ci": "jest --ci --maxWorkers=2",
"back": "nodemon --inspect -w modules ./node_modules/gulp/bin/gulp.js back",
"lint": "eslint ./ --cache --ignore-pattern .gitignore",