mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-05-28 13:59:37 +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') {
|
stage('Build Maven') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
// Using JFrog plugin to capture build info
|
def server = Artifactory.server(env.JFROG_CREDENTIALS_ID)
|
||||||
artifactory.upload spec: """{
|
|
||||||
|
// Run Maven Build
|
||||||
|
sh 'mvn clean install -DskipTests -Dcheckstyle.skip=true'
|
||||||
|
|
||||||
|
// Upload artifacts to Artifactory
|
||||||
|
server.upload spec: """{
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"pattern": "target/*.jar",
|
"pattern": "target/*.jar",
|
||||||
|
@ -24,21 +29,19 @@ pipeline {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}"""
|
}"""
|
||||||
|
|
||||||
// Run Maven Build
|
|
||||||
sh 'mvn clean deploy -DskipTests -Dcheckstyle.skip=true'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Publish Build Info') {
|
stage('Publish Build Info') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
// Publish build information to JFrog Artifactory
|
def server = Artifactory.server(env.JFROG_CREDENTIALS_ID)
|
||||||
|
|
||||||
def buildInfo = Artifactory.newBuildInfo()
|
def buildInfo = Artifactory.newBuildInfo()
|
||||||
buildInfo.name = "${JFROG_CLI_BUILD_NAME}"
|
buildInfo.name = env.JFROG_CLI_BUILD_NAME
|
||||||
buildInfo.number = "${JFROG_CLI_BUILD_NUMBER}"
|
buildInfo.number = env.JFROG_CLI_BUILD_NUMBER
|
||||||
|
|
||||||
Artifactory.publishBuildInfo(buildInfo)
|
server.publishBuildInfo(buildInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,4 +51,4 @@ pipeline {
|
||||||
echo "Build complete: ${env.JFROG_CLI_BUILD_NAME} #${env.BUILD_NUMBER}"
|
echo "Build complete: ${env.JFROG_CLI_BUILD_NAME} #${env.BUILD_NUMBER}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue