parent
f3d74e30c6
commit
30e14542ef
@ -0,0 +1,30 @@ |
|||||||
|
pipeline { |
||||||
|
agent any |
||||||
|
|
||||||
|
tools { |
||||||
|
// Install the Maven version configured as "M3" and add it to the path. |
||||||
|
maven "maven" |
||||||
|
} |
||||||
|
|
||||||
|
stages { |
||||||
|
stage('Get code') { |
||||||
|
steps { |
||||||
|
git url: 'https://gitea.xadocker.cn/resource/springboot-demo.git', branch: 'main', credentialsId: '867be6fa-88b1-4715-bcd6-3b2ebe671138' |
||||||
|
} |
||||||
|
} |
||||||
|
stage("Build") { |
||||||
|
steps { |
||||||
|
sh "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' |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
Loading…
Reference in new issue