mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 07:45:49 +00:00
add clean and complete build
This commit is contained in:
parent
53b64b87b2
commit
774ece6cf9
1 changed files with 45 additions and 88 deletions
|
@ -1,62 +1,17 @@
|
||||||
// pipeline {
|
|
||||||
// agent any
|
|
||||||
// stages{
|
|
||||||
|
|
||||||
|
|
||||||
// stage('Prepare') {
|
|
||||||
// // Clean workspace
|
|
||||||
// deleteDir()
|
|
||||||
// }
|
|
||||||
// stage('SCM') {
|
|
||||||
// checkout scm
|
|
||||||
// }
|
|
||||||
// stage("build"){
|
|
||||||
// sh "./mvnw compile"
|
|
||||||
|
|
||||||
// }
|
|
||||||
// stage('SonarQube Analysis') {
|
|
||||||
// environment{
|
|
||||||
// SCANNER_HOME = tool 'sonar-scanner'
|
|
||||||
// }
|
|
||||||
// env.NODEJS_HOME = "${tool 'nodejs'}"
|
|
||||||
// env.PATH = "${env.NODEJS_HOME}/bin:${env.PATH}"
|
|
||||||
// def mvn = tool 'M3';
|
|
||||||
// withSonarQubeEnv("sq1") {
|
|
||||||
// sh "${mvn}/bin/mvn sonar:sonar -Dsonar.projectKey=Web -Dsonar.projectName='Web' -Dsonar.sources=src/ -Dsonar.java.binaries=target/classes/ -Dsonar.exclusions=src/test/java/****/*.java"
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// stage("Build JAR"){
|
|
||||||
// steps{
|
|
||||||
// sh "./mvnw package"
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// post{
|
|
||||||
// success{
|
|
||||||
// archiveArtifacts "target/*.jar"
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Prepare') {
|
stage('Prepare') {
|
||||||
steps {
|
steps {
|
||||||
// Clean workspace
|
|
||||||
deleteDir()
|
deleteDir()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('SCM') {
|
stage('SCM') {
|
||||||
steps {
|
steps {
|
||||||
checkout scm
|
checkout scm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
sh './mvnw compile'
|
sh './mvnw compile'
|
||||||
|
@ -79,6 +34,8 @@ pipeline {
|
||||||
|
|
||||||
stage('Build JAR') {
|
stage('Build JAR') {
|
||||||
steps {
|
steps {
|
||||||
|
sh "./mvnw clean"
|
||||||
|
sh "./mvnw compile"
|
||||||
sh './mvnw package'
|
sh './mvnw package'
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
|
|
Loading…
Reference in a new issue