diff --git a/Jenkinsfile b/Jenkinsfile index 88b43ca58..c29c9b9b3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,12 +11,44 @@ pipeline { branch: 'main' } } + stage ('Artifactory configuration') { + steps { + rtServer ( + id: "ARTIFACTORY_SERVER", + url: 'https://gaseerwadham.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') { tools { jdk 'JDK_17' } steps { - sh "./mvnw ${params.MAVEN_GOAL}" + rtMavenRun ( + tool: 'MAVEN_DEFAULT', + pom: 'pom.xml', + goals: 'clean install', + deployerId: "MAVEN_DEPLOYER" + + ) + rtPublishBuildInfo ( + serverId: "ARTIFACTORY_SERVER" + ) } } stage('sonar analysis') {