Added the new file for jfrog

This commit is contained in:
n 2023-03-10 16:12:04 +05:30
parent 0a5a095da1
commit f39a9fc41b

41
Jenkinsfile vendored
View file

@ -18,6 +18,47 @@ pipeline {
sh 'export PATH="/usr/lib/jvm/java-1.17.0-openjdk-amd64/bin:$PATH" && mvn package'
}
}
stage ('Artifactory configuration') {
steps {
rtServer (
id: "ARTIFACTORY_SERVER",
url: 'https://qtsivajijfrog.jfrog.io/artifactory',
credentialsId: 'JFROG_TOKEN'
)
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') {
tools {
jdk 'JDK_17'
}
steps {
rtMavenRun (
tool: 'MAVEN_DEFAULT',
pom: 'pom.xml',
goals: 'clean install',
deployerId: "MAVEN_DEPLOYER"
)
rtPublishBuildInfo (
serverId: "ARTIFACTORY_SERVER"
)
//sh "mvn ${params.MAVEN_GOAL}"
}
}
stage('sonar analysis') {
steps {
withSonarQubeEnv('SONAR_TOKEN') {