This commit is contained in:
Bharatkumar5690 2023-03-09 18:52:25 +05:30
parent 2611d7c0e2
commit ecaf7eb5aa

10
Jenkinsfile vendored
View file

@ -1,5 +1,9 @@
pipeline { pipeline {
agent { label 'Master'} agent { label 'Master'}
tools {
jdk 'JDK_17'
maven 'MAVEN'
}
triggers { pollSCM ('* * * * *') } triggers { pollSCM ('* * * * *') }
stages{ stages{
stage('vcs') { stage('vcs') {
@ -15,14 +19,12 @@ pipeline {
url: 'https://sbharatkumar.jfrog.io/artifactory', url: 'https://sbharatkumar.jfrog.io/artifactory',
credentialsId: 'JFROG_CLOUD_ADMIN' credentialsId: 'JFROG_CLOUD_ADMIN'
) )
rtMavenDeployer ( rtMavenDeployer (
id: "MAVEN_DEPLOYER", id: "MAVEN_DEPLOYER",
serverId: "ARTIFACTORY_SERVER", serverId: "ARTIFACTORY_SERVER",
releaseRepo: 'libs-release', releaseRepo: 'libs-release',
snapshotRepo: 'libs-snapshot' snapshotRepo: 'libs-snapshot'
) )
rtMavenResolver ( rtMavenResolver (
id: "MAVEN_RESOLVER", id: "MAVEN_RESOLVER",
serverId: "ARTIFACTORY_SERVER", serverId: "ARTIFACTORY_SERVER",
@ -32,10 +34,6 @@ pipeline {
} }
} }
stage('package') { stage('package') {
tools {
jdk 'JDK_17'
maven 'MAVEN'
}
sh "mvn ${params.MAVEN_GOAL}" sh "mvn ${params.MAVEN_GOAL}"
} }
stage('Test the code by using sonarqube') { stage('Test the code by using sonarqube') {