Update Jenkinsfile

This commit is contained in:
Bharatkumar5690 2023-03-10 10:42:28 +05:30 committed by GitHub
parent 0a8a8a7c77
commit 74010d4ea0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

36
Jenkinsfile vendored
View file

@ -11,43 +11,9 @@ pipeline {
url: 'https://github.com/Bharatkumar5690/spring-petclinic.git'
}
}
stage('Artifactory configuration') {
steps {
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('package') {
steps {
rtMavenRun (
tool: 'MAVEN_DEFAULT',
pom: 'pom.xml',
goals: 'clean install',
deployerId: "MAVEN_DEPLOYER",
resolverId: "MAVEN_RESOLVER"
)
}
}
stage ('Publish build info') {
steps {
rtPublishBuildInfo (
serverId: "ARTIFACTORY_SERVER"
)
sh 'mvn package'
}
}
stage('Test the code by using sonarqube') {