From 4c10f0a3b6e72b18421d1ca50d6f461aca7710fd Mon Sep 17 00:00:00 2001 From: udaykiran Date: Wed, 9 Aug 2023 15:59:51 +0530 Subject: [PATCH] 22 --- jenkinsfile | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/jenkinsfile b/jenkinsfile index e69de29bb..bed4d8d6d 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -0,0 +1,48 @@ +pipeline { + agent { label 'JDK-17' } + options { + timeout(time: 30, unit: 'MINUTES') + } + triggers { + pollSCM('* * * * *') + } + tools { + jdk 'JDK-17' + } + stages { + stage('vcs') { + steps { + git url: 'https://github.com/uday1g/spring-petclinic.git', + branch: 'main' + } + } + stage('build and package') { + steps { + rtMavenDeployer ( + id: "SPC_DEPLOYER", + serverId: "JFROG_CLOUD", + releaseRepo: 'qt-app-libs-snapshot-local', + snapshotRepo: 'qt-app-libs-snapshot-local' + ) + rtMavenRun ( + tool: 'MAVEN_3.9', // Tool name from Jenkins configuration + pom: 'pom.xml', + goals: 'clean install', + deployerId: "SPC_DEPLOYER" + //, + //buildName: "${JOB_NAME}", + //buildNumber: "${BUILD_ID}" + ) + rtPublishBuildInfo ( + serverId: "JFROG_CLOUD" + ) + } + } + stage('reporting') { + steps { + junit testResults: '**/target/surefire-reports/TEST-*.xml' + } + } + } + +}