mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-29 10:55:48 +00:00
added jfrog in jenkinsfile
This commit is contained in:
parent
724b1552a5
commit
cf6c717a8c
1 changed files with 33 additions and 2 deletions
35
Jenkinsfile
vendored
35
Jenkinsfile
vendored
|
@ -7,9 +7,27 @@ pipeline {
|
||||||
url: 'https://github.com/Bharatkumar5690/spring-petclinic.git'
|
url: 'https://github.com/Bharatkumar5690/spring-petclinic.git'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build') {
|
stage ('Artifactory configuration') {
|
||||||
steps {
|
steps {
|
||||||
sh 'mvn package'
|
rtServer (
|
||||||
|
id: "ARTIFACTORY_SERVER",
|
||||||
|
url: 'https://sbharatkumar.jfrog.io/artifactory',
|
||||||
|
credentialsId: 'JFROG_CLOUD_ADMIN'
|
||||||
|
)
|
||||||
|
|
||||||
|
rtMavenDeployer (
|
||||||
|
id: "MAVEN_DEPLOYER",
|
||||||
|
serverId: "ARTIFACTORY_SERVER",
|
||||||
|
releaseRepo: 'libs-release',
|
||||||
|
snapshotRepo: 'libs-snapshot'
|
||||||
|
)
|
||||||
|
|
||||||
|
rtMavenResolver (
|
||||||
|
id: "MAVEN_RESOLVER",
|
||||||
|
serverId: "ARTIFACTORY_SERVER",
|
||||||
|
releaseRepo: 'libs-release',
|
||||||
|
snapshotRepo: 'libs-snapshot'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Test the code by using sonarqube') {
|
stage('Test the code by using sonarqube') {
|
||||||
|
@ -19,6 +37,19 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage ('Exec Maven') {
|
||||||
|
steps {
|
||||||
|
rtMavenRun (
|
||||||
|
tool: 'MAVEN_DEFAULT',
|
||||||
|
pom: 'pom.xml',
|
||||||
|
goals: 'clean install',
|
||||||
|
deployerId: "MAVEN_DEPLOYER",
|
||||||
|
)
|
||||||
|
rtPublishBuildInfo (
|
||||||
|
serverId: "ARTIFACTORY_SERVER"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Gathering the artifacts & test results') {
|
stage('Gathering the artifacts & test results') {
|
||||||
steps {
|
steps {
|
||||||
archiveArtifacts artifacts: '**/target/*.jar',
|
archiveArtifacts artifacts: '**/target/*.jar',
|
||||||
|
|
Loading…
Reference in a new issue