mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 21:15:50 +00:00
Create Jenkinsfile
Signed-off-by: WANGZE-ZYHT <1852788395@qq.com>
This commit is contained in:
parent
0c88f916db
commit
5cabac71ee
1 changed files with 24 additions and 0 deletions
24
Jenkinsfile
vendored
Normal file
24
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
pipeline {
|
||||
agent any // 使用任意可用节点
|
||||
tools {
|
||||
maven 'Maven 3.8.6' // 对应 Jenkins 中配置的 Maven 名称
|
||||
jdk 'JDK 11' // 对应 Jenkins 中配置的 JDK 名称
|
||||
}
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
git url: 'https://github.com/spring-projects/spring-petclinic.git', branch: 'main'
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'mvn clean package -DskipTests' // 跳过测试(仅演示打包)
|
||||
}
|
||||
}
|
||||
stage('Archive') {
|
||||
steps {
|
||||
archiveArtifacts artifacts: 'target/*.jar', fingerprint: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue