diff --git a/jenkinsfile b/jenkinsfile index a0e7f34b9..7e83a4474 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -18,5 +18,48 @@ pipeline { -Dsonar.projectKey=nareshspc' } } + stage('Artifactory configuration') { + steps { + rtServer ( + id: "ARTIFACTORY_SERVER", + url: 'https://nareshqt.jfrog.io', + credentialsId: 'jfrog' + ) + 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', + pom: 'pom.xml', + goals: 'package', + deployerId: "MAVEN_DEPLOYER" + ) + rtPublishBuildInfo ( + serverId: "ARTIFACTORY_SERVER" + ) + } + } + stage{ + steps{ + archiveArtifacts artifacts: '**target/*.jar', + onlyIfSuccessful: true + } + } } } \ No newline at end of file