| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,32 @@ | |||
| 1 | + pipeline { | ||
| 2 | + agent any | ||
| 3 | + | ||
| 4 | + tools { | ||
| 5 | + // Install the Maven version configured as "M3" and add it to the path. | ||
| 6 | + maven "Maven 3.6.3" | ||
| 7 | + } | ||
| 8 | + | ||
| 9 | + stages { | ||
| 10 | + stage('Build') { | ||
| 11 | + steps { | ||
| 12 | + // Get some code from a GitHub repository | ||
| 13 | + git 'https://github.com/jglick/simple-maven-project-with-tests.git' | ||
| 14 | + | ||
| 15 | + // Run Maven on a Unix agent. | ||
| 16 | + bat "mvn -Dmaven.test.failure.ignore=true clean package" | ||
| 17 | + | ||
| 18 | + // To run Maven on a Windows agent, use | ||
| 19 | + // bat "mvn -Dmaven.test.failure.ignore=true clean package" | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + post { | ||
| 23 | + // If Maven was able to run the tests, even if some of the test | ||
| 24 | + // failed, record the test results and archive the jar file. | ||
| 25 | + success { | ||
| 26 | + junit '**/target/surefire-reports/TEST-*.xml' | ||
| 27 | + archiveArtifacts 'target/*.jar' | ||
| 28 | + } | ||
| 29 | + } | ||
| 30 | + } | ||
| 31 | + } | ||
| 32 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments