This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 3160da7d authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

Initial version to run on Jenkins

parent 35e14bcb
2 merge requests!17Initial Merge to Prepare Release 1.0.0,!1Resolve "Metadaten konsolideren"
pipeline {
agent any
environment {
scannerHome = tool 'SonarQube Scanner'
}
options {
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
}
tools {
// Install the Maven version configured as "M3" and add it to the path.
maven "/usr/share/maven"
}
stages {
stage('Compile') {
steps {
milestone 1
withSonarQubeEnv('SonarQube Production') {
sh "mvn -Dmaven.test.failure.ignore=true -Dsonar.projectName=WS2020_PS_SWA_6_2 -Dsonar.projectKey=WS2020_PS_SWA_6_2 clean test jacoco:report sonar:sonar"
}
}
}
post {
failure {
notifyByEmail("Failure");
}
unstable {
notifyByEmail("Unstable");
}
fixed {
notifyByEmail("Fixed");
}
}
}
void notifyByEmail(String reason) {
def mailRecipients = "michael.breu@arctis.at"
emailext (
subject: reason + ": Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
body: '''${SCRIPT, template="groovy-html.template"}''',
mimeType: 'text/html',
recipientProviders: [[$class: 'CulpritsRecipientProvider']]
)
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment