2022-06-08 17:35:09 +00:00
|
|
|
pipeline {
|
2022-06-09 09:37:08 +00:00
|
|
|
agent any
|
|
|
|
tools {
|
|
|
|
nodejs "node"
|
|
|
|
}
|
2022-06-09 07:45:33 +00:00
|
|
|
stages {
|
2022-06-09 09:41:42 +00:00
|
|
|
stage('NPM Install') {
|
2022-06-09 09:58:42 +00:00
|
|
|
steps {
|
2022-06-09 09:41:42 +00:00
|
|
|
sh 'npm install'
|
|
|
|
}
|
|
|
|
}
|
2022-06-09 08:38:34 +00:00
|
|
|
|
2022-06-09 09:41:42 +00:00
|
|
|
stage('Test') {
|
2022-06-09 09:58:42 +00:00
|
|
|
steps {
|
2022-06-09 09:41:42 +00:00
|
|
|
sh 'ng test --progress=false --watch false'
|
2022-06-09 09:58:42 +00:00
|
|
|
junit '**/test-results.xml'
|
2022-06-09 09:41:42 +00:00
|
|
|
}
|
|
|
|
}
|
2022-06-09 08:38:34 +00:00
|
|
|
|
2022-06-09 09:41:42 +00:00
|
|
|
stage('Lint') {
|
2022-06-09 09:58:42 +00:00
|
|
|
steps {
|
|
|
|
sh 'ng lint'
|
|
|
|
}
|
2022-06-09 09:41:42 +00:00
|
|
|
}
|
2022-06-09 08:38:34 +00:00
|
|
|
|
2022-06-09 09:41:42 +00:00
|
|
|
stage('Build') {
|
2022-06-09 09:58:42 +00:00
|
|
|
steps {
|
|
|
|
sh 'ng build --prod --aot --sm --progress=false'
|
|
|
|
}
|
2022-06-09 09:41:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|