-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathJenkinsfile.scripted
More file actions
26 lines (26 loc) · 844 Bytes
/
Jenkinsfile.scripted
File metadata and controls
26 lines (26 loc) · 844 Bytes
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
node {
stage('checkout') {
checkout scm
GIT_COMMIT = sh(returnStdout: true, script: 'git log -n 1 --pretty=format:%H').trim()
}
withCoverityEnv(coverityToolName: 'latest', connectInstance: 'localhost') {
PROJECT = 'hello-c'
STREAM = 'hello-c'
IDIR = 'idir'
stage('build') {
sh "cov-build --dir ${IDIR} make all"
}
stage('analyze') {
sh "cov-analyze --dir ${IDIR} --strip-path ${WORKSPACE} --all --enable-callgraph-metrics --enable-fnptr --enable-virtual"
}
stage('commit') {
sh "cov-commit-defects --dir ${IDIR} --host ${COVERITY_HOST} --stream ${STREAM} --scm git --description ${BUILD_TAG} --target Linux_x86_64 --version ${GIT_COMMIT}"
}
}
stage('results') {
coverityResults connectInstance: 'localhost', connectView: 'Outstanding Issues', projectId: "${PROJECT}"
}
stage('post') {
deleteDir()
}
}