-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added separate jenkinsfile for coverage
- Loading branch information
1 parent
0fb7192
commit 4ba9783
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
pipeline { | ||
agent { label 'maven' } | ||
|
||
options { | ||
timeout(time: 1, unit: 'HOURS') | ||
buildDiscarder(logRotator(numToKeepStr: '5')) | ||
} | ||
|
||
stages { | ||
stage('checkout') { | ||
steps { | ||
git(url: 'https://github.com/indigo-iam/iam.git', branch: env.BRANCH_NAME) | ||
stash name: 'code', useDefaultExcludes: false | ||
} | ||
} | ||
|
||
stage('coverage') { | ||
steps { | ||
unstash 'code' | ||
sh 'mvn -B clean cobertura:cobertura' | ||
|
||
publishHTML(target: [ | ||
reportName : 'Cobertura Report', | ||
reportDir : 'iam-login-service/target/site/cobertura/', | ||
reportFiles : 'index.html', | ||
keepAll : true, | ||
alwaysLinkToLastBuild: true, | ||
allowMissing : false | ||
]) | ||
} | ||
} | ||
} | ||
|
||
post { | ||
success { | ||
slackSend channel: "#iam", color: 'good', message: "${env.JOB_NAME} - #${env.BUILD_NUMBER} Success (<${env.BUILD_URL}|Open>)" | ||
} | ||
|
||
unstable { | ||
slackSend channel: "#iam", color: 'danger', message: "${env.JOB_NAME} - #${env.BUILD_NUMBER} Unstable (<${env.BUILD_URL}|Open>)" | ||
} | ||
|
||
failure { | ||
slackSend channel: "#iam", color: 'danger', message: "${env.JOB_NAME} - #${env.BUILD_NUMBER} Failure (<${env.BUILD_URL}|Open>)" | ||
} | ||
} | ||
} |