Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Jenkins Pipeline example for Email-ext plugin
node {
stage('git'){
git 'https://github.com/allure-examples/allure-testng-example.git'
}
stage('test'){
def mvnHome = tool 'Maven 3.x'
def mvn = "${mvnHome}/bin/mvn"
sh "${mvn} test"
}
stage('report'){
junit 'target/surefire-reports/*.xml'
allure includeProperties: false, jdk: '', results: [[path: 'target/allure-results']]
}
stage('actions'){
emailext body: '''${SCRIPT, template="build-report.groovy"}''',
subject: "[Jenkins] REPORT",
to: "user@example.com"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.