mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-24 16:55:50 +00:00
Update Jenkinsfile
This commit is contained in:
parent
d85616540d
commit
ee77b055d9
1 changed files with 17 additions and 19 deletions
36
Jenkinsfile
vendored
36
Jenkinsfile
vendored
|
@ -1,24 +1,22 @@
|
||||||
node('$hostname'){
|
pipeline {
|
||||||
|
agent {
|
||||||
|
kubernetes {
|
||||||
|
label 'promo-app' // all your pods will be named with this prefix, followed by a unique id
|
||||||
|
idleMinutes 5 // how long the pod will live after no jobs have run on it
|
||||||
|
yamlFile 'build-pod.yaml' // path to the pod definition relative to the root of our project
|
||||||
|
defaultContainer 'maven' // define a default container if more than a few stages use it, will default to jnlp container
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stages {
|
||||||
stage('scm'){
|
stage('scm'){
|
||||||
git 'https://github.com/ametgud4u/spring-petclinic.git'
|
steps {
|
||||||
|
git 'https://github.com/spring-projects/spring-petclinic.git'
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('build'){
|
|
||||||
sh label: '', script: 'mvn clean package'
|
|
||||||
}
|
}
|
||||||
|
stage('Build'){
|
||||||
stage('Sonar') {
|
steps {
|
||||||
withSonarQubeEnv('sonar') {
|
sh 'mvn clean package'
|
||||||
sh 'mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('postbuild'){
|
|
||||||
junit '**/target/surefire-reports/*.xml'
|
|
||||||
archiveArtifacts 'target/*.jar'
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Create Docker Image ') {
|
|
||||||
sh '${WORKSPACE}/SpringPetClinic-Piple/BuildImage.sh'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue