forked from cygnusb2b/fortnight-graph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
28 lines (27 loc) · 1.4 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
node {
def nodeBuilder = docker.image("node:8")
nodeBuilder.pull()
try {
stage('Checkout') {
checkout scm
withCredentials([file(credentialsId: 'nativex.graph.config.google-cloud.json', variable: 'FILE')]) {
sh "cp -f $FILE .google-cloud.json"
}
}
stage('Test') {
try {
sh 'yarn run coverage'
junit 'coverage/test-results.xml'
cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'coverage/cobertura-coverage.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false
} catch (e) {
junit 'coverage/test-results.xml'
cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'coverage/cobertura-coverage.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false
sh 'yarn run postcoverage'
throw e
}
}
} catch (e) {
slackSend color: 'bad', channel: '#codebot', message: "Failed testing ${env.JOB_NAME} #${env.BUILD_NUMBER} (<${env.BUILD_URL}|View>)"
throw e
}
}