diff --git a/jenkinsfile b/jenkinsfile new file mode 100644 index 000000000..3d03f2f9a --- /dev/null +++ b/jenkinsfile @@ -0,0 +1,45 @@ +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: 'uday-libs-release-local', + snapshotRepo: 'uday-libs-snapshot-local' + ) + rtMavenRun ( + tool: 'maven 3.9', + pom: 'pom.xml', + goals: 'clean install', + deployerId: "SPC_DEPLOYER" + ) + rtPublishBuildInfo ( + serverId: "JFROG_CLOUD" + ) + } + } + stage('reporting') { + steps { + junit testResults: '**/target/surefire-reports/TEST-*.xml' + } + } + } + +}