jenkins-scripts/Jenkinsfile

43 lines
564 B
Plaintext
Raw Normal View History

2021-07-14 20:21:12 +03:00
pipeline {
agent {
docker {
2024-03-29 10:17:42 +03:00
image 'node:18'
2021-07-14 20:21:12 +03:00
}
}
stages {
stage('install') {
steps {
sh 'node -v'
sh 'npm -v'
2024-03-29 10:17:42 +03:00
sh 'npm ci'
2021-07-14 20:21:12 +03:00
}
}
stage('eslint') {
steps {
2024-03-29 10:17:42 +03:00
sh 'npm run eslint || npm run lint'
}
}
stage('test') {
steps {
sh 'npm t'
2021-07-14 20:21:12 +03:00
}
}
stage('build') {
steps {
2024-03-29 10:17:42 +03:00
sh 'npm run build:prod'
2021-07-14 20:21:12 +03:00
}
}
stage('clean-all') {
steps {
sh 'rm -rf .[!.]*'
sh 'rm -rf ./*'
sh 'ls -a'
}
}
}
}