-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile
63 lines (61 loc) · 1.61 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
58
59
60
61
62
63
#!/usr/bin/env groovy
@Library('kanolib') _
pipeline {
agent {
label 'ubuntu_18.04'
}
post {
always {
junit allowEmptyResults: true, testResults: 'test-results.xml'
}
regression {
notify_culprits currentBuild.result
}
}
stages {
stage('checkout') {
steps {
checkout([ $class: 'GitSCM',
branches: [[name: '*/master']],
extensions: [[
$class: 'MessageExclusion', excludedMessage: '.*skip-?ci.*'
]],
])
}
}
stage('tools') {
steps {
script {
def NODE_PATH = tool 'Node 8.11.2'
env.PATH = "${env.PATH}:${NODE_PATH}/bin"
def YARN_PATH = tool 'yarn'
env.PATH = "${env.PATH}:${YARN_PATH}/bin"
}
}
}
stage('install dependencies') {
steps {
script {
sshagent(['read-only-github']) {
sh "yarn --production=false"
}
}
}
}
stage('checkstyle') {
steps {
script {
sh "yarn checkstyle-ci || exit 0"
step([$class: 'CheckStylePublisher', pattern: 'eslint.xml'])
}
}
}
stage('test') {
steps {
script {
sh "yarn test-ci"
}
}
}
}
}