Chuck Norris first pipeline

This commit is contained in:
Guillem Hernandez Sola
2020-10-15 12:02:43 +02:00
parent ec9eed71e8
commit a87ed10283

View File

@@ -0,0 +1,36 @@
pipeline {
agent any
tools {
// Install the Maven version configured as "M3" and add it to the path.
maven "maven_363"
}
stages {
stage('Build') {
steps {
// Get some code from a GitHub repository
git url: 'https://github.com/jglick/simple-maven-project-with-tests.git'
// Run Maven on a Unix agent.
sh "mvn -Dmaven.test.failure.ignore=true clean package"
//sh "mvn clean package"
// To run Maven on a Windows agent, use
// bat "mvn -Dmaven.test.failure.ignore=true clean package"
}
post {
// If Maven was able to run the tests, even if some of the test
// failed, record the test results and archive the jar file.
success {
junit '**/target/surefire-reports/TEST-*.xml'
archiveArtifacts 'target/*.jar'
}
}
}
stage('Chuck Norris'){
steps{
chuckNorris()
}
}
}
}