added chnages

This commit is contained in:
Mekalaabhiramreddy 2023-03-15 15:04:21 +05:30
parent 8cce4e7c6d
commit b6296063fe

View file

@ -0,0 +1,52 @@
pipeline {
agent { label 'jfrog'}
stages {
stage('build') {
steps {
git url: 'https://github.com/Mekalaabhiramreddy/spring-petclinic.git',
branch: 'main'
}
}
stage ('Artifactory configuration') {
steps {
rtServer (
id: "ARTIFACTORY_SERVER",
url: 'https://abhiram13.jfrog.io/artifactory',
credentialsId: 'jfrog1'
)
rtMavenDeployer (
id: "MAVEN_DEPLOYER",
serverId: "ARTIFACTORY_SERVER",
releaseRepo: 'jfrog',
snapshotRepo: 'jfrog'
)
rtMavenResolver (
id: "MAVEN_RESOLVER",
serverId: "ARTIFACTORY_SERVER",
releaseRepo: 'libs-release',
snapshotRepo: 'libs-snapshot'
)
}
}
stage('package') {
steps {
sh "mvn ${params.MAVEN_GOAL}"
rtMavenRun (
tool: 'maven',
pom: 'pom.xml',
goals: 'clean install',
deployerId: "MAVEN_DEPLOYER"
)
rtPublishBuildInfo (
serverId: "ARTIFACTORY_SERVER"
)
//sh "mvn ${params.MAVEN_GOAL}"
}
}
}
}