forked from Kopano-dev/kpop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
55 lines (54 loc) · 1.35 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
#!/usr/bin/env groovy
pipeline {
agent {
docker {
image 'node:14'
}
}
options {
copyArtifactPermission('kapp-release-nightly,kapp-release')
}
environment {
CI = 'true'
YARN_CACHE_FOLDER = '/tmp/.yarn-cache'
}
stages {
stage('Lint') {
steps {
sh 'make lint-checkstyle'
recordIssues qualityGates: [[threshold: 5, type: 'TOTAL', unstable: false]], tools: [esLint(pattern: 'test/tests.eslint.xml')], unhealthy: 50
}
}
stage('Build') {
steps {
sh 'make'
}
}
stage('Test') {
steps {
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('Docs') {
steps {
sh 'make doc'
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: true, reportDir: 'styleguide/', reportFiles: 'index.html', reportName: 'Documentation', reportTitles: ''])
}
}
stage('Dist') {
steps {
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/*.tgz', fingerprint: true
}
}
}
post {
always {
cleanWs()
}
}
}