forked from jbrionesd/mictlan_prueba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
36 lines (34 loc) · 1.07 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
pipeline {
agent any
stages {
stage('install deps') {
steps {
sh 'npm install'
}
}
stage('build') {
steps {
sh 'npm run build'
catchError() {
emailext(subject: '[ERROR] $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:', body: '$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:', from: 'dev', to: 'dev', attachLog: true)
}
}
}
stage('test') {
steps {
sh 'npm run test'
catchError() {
emailext(subject: '[ERROR] $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:', body: '$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS: Check console output at $BUILD_URL to view the results.', from: 'dev', to: 'test', attachLog: true)
}
}
}
stage('release') {
when {
branch 'master'
}
steps {
emailext(subject: '[SUCCESS] $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:', body: '[SUCCESS] $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:', from: 'dev', to: 'dev, test, mauro')
}
}
}
}