mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-04-24 19:32:48 +00:00
jenmkinsfile
This commit is contained in:
parent
3a321133af
commit
8d83725287
1 changed files with 14 additions and 11 deletions
25
Jenkinsfile
vendored
25
Jenkinsfile
vendored
|
@ -15,8 +15,13 @@ pipeline {
|
|||
stage('Build Maven') {
|
||||
steps {
|
||||
script {
|
||||
// Using JFrog plugin to capture build info
|
||||
artifactory.upload spec: """{
|
||||
def server = Artifactory.server(env.JFROG_CREDENTIALS_ID)
|
||||
|
||||
// Run Maven Build
|
||||
sh 'mvn clean install -DskipTests -Dcheckstyle.skip=true'
|
||||
|
||||
// Upload artifacts to Artifactory
|
||||
server.upload spec: """{
|
||||
"files": [
|
||||
{
|
||||
"pattern": "target/*.jar",
|
||||
|
@ -24,21 +29,19 @@ pipeline {
|
|||
}
|
||||
]
|
||||
}"""
|
||||
|
||||
// Run Maven Build
|
||||
sh 'mvn clean deploy -DskipTests -Dcheckstyle.skip=true'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Publish Build Info') {
|
||||
steps {
|
||||
script {
|
||||
// Publish build information to JFrog Artifactory
|
||||
def server = Artifactory.server(env.JFROG_CREDENTIALS_ID)
|
||||
|
||||
def buildInfo = Artifactory.newBuildInfo()
|
||||
buildInfo.name = "${JFROG_CLI_BUILD_NAME}"
|
||||
buildInfo.number = "${JFROG_CLI_BUILD_NUMBER}"
|
||||
|
||||
Artifactory.publishBuildInfo(buildInfo)
|
||||
buildInfo.name = env.JFROG_CLI_BUILD_NAME
|
||||
buildInfo.number = env.JFROG_CLI_BUILD_NUMBER
|
||||
|
||||
server.publishBuildInfo(buildInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,4 +51,4 @@ pipeline {
|
|||
echo "Build complete: ${env.JFROG_CLI_BUILD_NAME} #${env.BUILD_NUMBER}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue