-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathJenkinsfile-pr-checks
64 lines (61 loc) · 1.28 KB
/
Jenkinsfile-pr-checks
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
64
pipeline {
agent {
node {
label 'qa-executors'
customWorkspace "/var/lib/jenkins/workspace/design-system-pr-${BRANCH_NAME}"
}
}
environment {
ARTIFACTORY_NPM_TOKEN = "${env.JENKINS_ARTIFACTORY_PASSWORD}"
}
stages {
stage('Build') {
options {
timeout(time: 2, unit: 'MINUTES')
}
steps {
sh 'yarn ci'
}
}
stage('Lint') {
options {
timeout(time: 2, unit: 'MINUTES')
}
steps {
sh 'yarn lint:jenkins'
}
}
stage('Test') {
environment {
COVERAGE = true
}
options {
timeout(time: 2, unit: 'MINUTES')
}
steps {
sh 'yarn test'
}
}
}
post {
success {
cobertura autoUpdateHealth: true,
autoUpdateStability: true,
coberturaReportFile: '**/coverage/cobertura-coverage.xml',
fileCoverageTargets: '63, 63, 63',
lineCoverageTargets: '46, 46, 46',
conditionalCoverageTargets: '37, 37, 37',
methodCoverageTargets: '46, 46, 46',
failUnhealthy: true,
failUnstable: true,
maxNumberOfBuilds: 0,
onlyStable: false,
zoomCoverageChart: false
}
cleanup {
dir('node_modules') {
deleteDir()
}
}
}
}