-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathJenkinsfile
60 lines (59 loc) · 1.31 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
#!/usr/bin/env groovy
pipeline {
agent {
docker {
image 'node:14'
args '-u 0'
}
}
environment {
CI = 'true'
DEBIAN_FRONTEND = 'noninteractive'
}
stages {
stage('Bootstrap') {
steps {
echo 'Bootstrapping..'
sh 'apt-get update && apt-get install -y python3 sox libav-tools'
}
}
stage('Lint') {
steps {
echo 'Linting..'
sh 'make lint-checkstyle'
recordIssues qualityGates: [[threshold: 5, type: 'TOTAL', unstable: false]], tools: [esLint(pattern: 'test/tests.eslint.xml')], unhealthy: 50
}
}
stage('Build') {
steps {
echo 'Building..'
sh 'CI=false make'
}
}
stage('Test') {
when {
branch 'devel'
}
steps {
echo 'Testing..'
sh 'make test-coverage'
junit allowEmptyResults: true, testResults: 'test/jest-test-results.xml'
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: true, reportDir: 'coverage/lcov-report/', reportFiles: 'index.html', reportName: 'Test Coverage Report', reportTitles: ''])
}
}
stage('Dist') {
steps {
echo 'Dist..'
sh 'make dist'
sh '$(git diff --stat)'
sh 'test -z "$(git diff --shortstat 2>/dev/null |tail -n1)" && echo "Clean check passed."'
archiveArtifacts artifacts: 'dist/*.tar.gz', fingerprint: true
}
}
}
post {
always {
cleanWs()
}
}
}