Created
May 2, 2018 10:07
-
-
Save sreekanth1990/819ea2ef1fd289d6d61f5f083e924783 to your computer and use it in GitHub Desktop.
Jenkins Pipeline example for Email-ext plugin
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
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: "[email protected]" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment