Skip to content

Instantly share code, notes, and snippets.

@sreekanth1990
Created May 2, 2018 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sreekanth1990/819ea2ef1fd289d6d61f5f083e924783 to your computer and use it in GitHub Desktop.
Save sreekanth1990/819ea2ef1fd289d6d61f5f083e924783 to your computer and use it in GitHub Desktop.
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: "dmitry.mayer@fxclub.com"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment