Skip to content

Commit

Permalink
Add a Jenkinsfile
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Berezovskyi <andriib@kth.se>
  • Loading branch information
berezovskyi committed Feb 15, 2022
1 parent ed04178 commit bb47699
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
pipeline {
agent any
tools {
maven 'apache-maven-latest'
jdk 'temurin-jdk11-latest'
}
stages {
stage('Build') {
steps {
sh '''
java -version
mvn -v
'''
}
}
}
post {
// send a mail on unsuccessful and fixed builds
unsuccessful { // means unstable || failure || aborted
emailext subject: 'Build $BUILD_STATUS $PROJECT_NAME #$BUILD_NUMBER!',
body: '''Check console output at $BUILD_URL to view the results.''',
recipientProviders: [culprits(), requestor()],
to: 'andrew+ham@berezovskyi.me'
}
fixed { // back to normal
emailext subject: 'Build $BUILD_STATUS $PROJECT_NAME #$BUILD_NUMBER!',
body: '''Check console output at $BUILD_URL to view the results.''',
recipientProviders: [culprits(), requestor()],
to: 'andrew+ham@berezovskyi.me'
}
}
}

0 comments on commit bb47699

Please sign in to comment.