-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
49 lines (45 loc) · 1.35 KB
/
Copy pathJenkinsfile
File metadata and controls
49 lines (45 loc) · 1.35 KB
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
pipeline {
options { timeout(time: 3, unit: 'MINUTES') }
agent { docker {
image 'node:latest'
args '-v /.cache/yarn'
} }
stages {
stage('Install NPM/Yarn dependencies') {
steps {
sh 'yarn install'
}
}
stage('build') {
steps {
sh 'rm -rf lib'
sh 'yarn grunt'
}
}
stage('tests with coverage') {
steps {
sh 'yarn jest --coverage'
}
}
stage('eslint') {
steps {
sh 'yarn eslint -f checkstyle -o eslint.xml src || true'
}
}
stage('build distribution') {
steps {
sh 'mkdir -p build'
sh 'tar --exclude core --exclude node_modules --exclude build --exclude-vcs -zcv . -f build/docutils-js.tar.gz'
}
}
}
post {
always {
recordIssues enabledForFailure: true, healthy: 100, minimumSeverity: 'NORMAL', sourceCodeEncoding: 'UTF-8', tools: [esLint(pattern: 'eslint.xml', reportEncoding: 'UTF-8')], unhealthy: 200
publishHTML([allowMissing: false, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'coverage/lcov-report', reportFiles: 'index.html', reportName: 'Code Coverage', reportTitles: 'Project Coverage Overview'])
junit 'junit.xml'
archiveArtifacts artifacts: 'build/*.tar.gz', fingerprint: true
archiveArtifacts artifacts: '**/__snapshots__/*', fingerprint: true
}
}
}