mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-27 01:45:49 +00:00
added jenkinsfile
This commit is contained in:
parent
d5adbad038
commit
e7ebf84c62
1 changed files with 39 additions and 29 deletions
66
Jenkinsfile
vendored
66
Jenkinsfile
vendored
|
@ -1,39 +1,49 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {label 'java-11'}
|
agent { label 'jenkins123' }
|
||||||
stages{
|
triggers { pollSCM(* * * * *) }
|
||||||
stage ('git') {
|
stages {
|
||||||
|
stage('git') {
|
||||||
steps {
|
steps {
|
||||||
git branch: 'main',
|
git branch: "main",
|
||||||
url: 'https://github.com/Srikanthreddy1000/spring-petclinic.git'
|
url: "https://github.com/Srikanthreddy1000/spring-petclinic.git"
|
||||||
}
|
}
|
||||||
stage('jfrog deployment') {
|
}
|
||||||
|
stage('Mvn Build') {
|
||||||
steps {
|
steps {
|
||||||
rtMavenDeployer (
|
sh "mvn package"
|
||||||
id: "jfrog-artifact",
|
}
|
||||||
|
}
|
||||||
|
stage('sonarqube analysis') {
|
||||||
|
steps {
|
||||||
|
withSonarQubeEnv('My SonarQube Server') {
|
||||||
|
sh 'mvn clean package sonar:sonar'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('qualitygate') {
|
||||||
|
steps {
|
||||||
|
timeout(time: 1, unit: 'HOURS') {
|
||||||
|
waitForQualityGate abortPipeline: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Jfrog') {
|
||||||
|
steps {
|
||||||
|
rtMavenDeployer (
|
||||||
|
id: "Jfrog-id-deployer",
|
||||||
serverId: "srikanthjfrog",
|
serverId: "srikanthjfrog",
|
||||||
releaseRepo: default-libs-release-local,
|
releaseRepo: libs-release-local,
|
||||||
snapshotRepo: default-libs-snapshot-local
|
snapshotRepo: libs-snapshot-local
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage ('Maven') {
|
|
||||||
steps {
|
|
||||||
rtMavenRun (
|
|
||||||
tool: maven-build
|
|
||||||
pom: 'pom.xml',
|
|
||||||
goals: 'clean install',
|
|
||||||
deployerId: "srikanthjfrog"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage ('Publish build info') {
|
|
||||||
steps {
|
|
||||||
rtPublishBuildInfo (
|
|
||||||
serverId: "srikanthjfrog"
|
|
||||||
)
|
)
|
||||||
|
rtMavenResolver (
|
||||||
|
id: "Jfrog-id-resolver",
|
||||||
|
serverId: "srikanthjfrog",
|
||||||
|
releaseRepo: libs-release-local,
|
||||||
|
snapshotRepo: libs-snapshot-local
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue