-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
57 lines (54 loc) · 1.55 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
52
53
54
55
56
57
#!/usr/bin/env groovy
pipeline {
agent none
stages {
stage('Test') {
agent {
docker {
image 'node'
args '-u root'
}
}
steps {
echo 'Beginning testing phase...'
echo 'installing dependencies'
sh 'yarn install --ignore-scripts'
echo 'running tests'
sh 'yarn test:lint'
sh 'yarn test:flow'
sh 'yarn test:jest'
echo 'tests complete, sending coverage'
sh 'cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js'
echo 'Testing phase complete'
}
}
stage('Build') {
agent {
docker {
image 'node'
args '-u root'
}
}
options { skipDefaultCheckout() }
steps {
echo 'Beginning building phase...'
sh 'yarn build'
echo 'Building phase complete'
}
}
stage('Publish') {
agent {
node {
label 'master'
}
}
options { skipDefaultCheckout() }
steps {
echo 'publishing branch ' + env.BRANCH_NAME
sh 'chmod +x ./publish.sh'
sh './publish.sh ' + env.BRANCH_NAME
echo 'Publishing complete'
}
}
}
}