From a87ed10283dc4f3309a421c14b74ebe35fcc4ed1 Mon Sep 17 00:00:00 2001 From: Guillem Hernandez Sola Date: Thu, 15 Oct 2020 12:02:43 +0200 Subject: [PATCH] Chuck Norris first pipeline --- 000-first-pipeline | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/000-first-pipeline b/000-first-pipeline index e69de29..e7c59e0 100644 --- a/000-first-pipeline +++ b/000-first-pipeline @@ -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() + } + } + } +}