2023-08-01 13:14:02 +03:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
docker {
|
2024-10-16 11:20:20 +03:00
|
|
|
image 'node:20'
|
2023-08-01 13:14:02 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('install') {
|
|
|
|
steps {
|
|
|
|
sh 'node -v'
|
|
|
|
sh 'npm -v'
|
2024-10-16 11:20:20 +03:00
|
|
|
sh 'npm ci'
|
2023-08-01 13:14:02 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('eslint') {
|
|
|
|
steps {
|
|
|
|
sh 'npm run eslint'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('test') {
|
|
|
|
steps {
|
|
|
|
sh 'npm run test:start'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-10-16 11:06:23 +03:00
|
|
|
stage('archiving') {
|
2024-10-16 11:20:20 +03:00
|
|
|
steps {
|
2024-10-16 11:06:23 +03:00
|
|
|
script {
|
|
|
|
archiveArtifacts artifacts: 'coverage/*/**'
|
|
|
|
}
|
2024-10-16 11:20:20 +03:00
|
|
|
}
|
2024-10-16 11:06:23 +03:00
|
|
|
}
|
|
|
|
|
2023-08-01 13:14:02 +03:00
|
|
|
stage('clean-all') {
|
|
|
|
steps {
|
|
|
|
sh 'rm -rf .[!.]*'
|
|
|
|
sh 'rm -rf ./*'
|
|
|
|
sh 'ls -a'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-10-16 11:06:23 +03:00
|
|
|
}
|