forked from agileworks-tw/node-tdd-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
19 lines (15 loc) · 803 Bytes
/
Jenkinsfile
File metadata and controls
19 lines (15 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
node {
try{
slackSend channel: '#hellojs-2016', message: "started ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)", teamDomain: 'agileworks-tw', token: 'JhXFKEl6cBFoQ4v52BEJw9Mr'
stage 'checkout project'
git url: 'https://github.com/agileworks-tw/node-tdd-sample.git'
stage 'build'
sh 'npm i'
stage 'test'
sh 'npm run test'
slackSend channel: '#hellojs-2016', color: 'good', message: "success ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)", teamDomain: 'agileworks-tw', token: 'JhXFKEl6cBFoQ4v52BEJw9Mr'
}catch(e){
slackSend channel: '#hellojs-2016', color: 'danger', message: "fail ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)", teamDomain: 'agileworks-tw', token: 'JhXFKEl6cBFoQ4v52BEJw9Mr'
throw e;
}
}