forked from LiskArchive/lisk-commander
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
51 lines (47 loc) · 1.04 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
node('lisky-01'){
lock(resource: "lisky-01", inversePrecedence: true) {
stage ('Prepare Workspace') {
deleteDir()
checkout scm
}
stage ('Build Dependencies') {
try {
sh '''#!/bin/bash
# Install Deps
npm install --verbose
cp ~/.coveralls.yml-lisky .coveralls.yml
'''
} catch (err) {
currentBuild.result = 'FAILURE'
error('Stopping build, installation failed')
}
}
stage ('Run Eslint') {
try {
sh '''#!/bin/bash
# Run Eslint
grunt eslint
'''
} catch (err) {
currentBuild.result = 'FAILURE'
error('Stopping build, tests failed')
}
}
stage ('Run tests') {
try {
sh '''#!/bin/bash
# Run Tests
npm run test
'''
} catch (err) {
currentBuild.result = 'FAILURE'
error('Stopping build, tests failed')
}
}
stage ('Set milestone') {
milestone 1
deleteDir()
currentBuild.result = 'SUCCESS'
}
}
}