This commit is contained in:
Primakov Alexandr Alexandrovich 2024-10-16 11:20:20 +03:00
parent afc782f50f
commit 34d2889c1d
2 changed files with 5 additions and 12 deletions

14
Jenkinsfile vendored
View File

@ -1,7 +1,7 @@
pipeline { pipeline {
agent { agent {
docker { docker {
image 'node:18' image 'node:20'
} }
} }
@ -10,7 +10,7 @@ pipeline {
steps { steps {
sh 'node -v' sh 'node -v'
sh 'npm -v' sh 'npm -v'
sh 'npm install' sh 'npm ci'
} }
} }
@ -22,22 +22,16 @@ pipeline {
stage('test') { stage('test') {
steps { steps {
sh 'npm run test:start' sh 'npm run test'
} }
} }
stage('archiving') { stage('archiving') {
steps {
script { script {
archiveArtifacts artifacts: 'coverage/*/**' archiveArtifacts artifacts: 'coverage/*/**'
} }
} }
stage('clean-all') {
steps {
sh 'rm -rf .[!.]*'
sh 'rm -rf ./*'
sh 'ls -a'
}
} }
} }
} }

View File

@ -12,8 +12,7 @@
"redeploy": "npm run deploy:d:stop && npm run deploy:d:build && npm run deploy:d:up", "redeploy": "npm run deploy:d:stop && npm run deploy:d:build && npm run deploy:d:up",
"eslint": "npx eslint ./server", "eslint": "npx eslint ./server",
"eslint:fix": "npx eslint ./server --fix", "eslint:fix": "npx eslint ./server --fix",
"test": "jest", "test": "jest"
"test:start": "start-server-and-test up:prod 8044 test"
}, },
"repository": { "repository": {
"type": "git", "type": "git",