mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 23:35:50 +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 {
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage('Prepare') {
|
||||
steps {
|
||||
// Clean workspace
|
||||
deleteDir()
|
||||
}
|
||||
}
|
||||
|
||||
stage('SCM') {
|
||||
steps {
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh './mvnw compile'
|
||||
|
@ -79,6 +34,8 @@ pipeline {
|
|||
|
||||
stage('Build JAR') {
|
||||
steps {
|
||||
sh "./mvnw clean"
|
||||
sh "./mvnw compile"
|
||||
sh './mvnw package'
|
||||
}
|
||||
post {
|
||||
|
|
Loading…
Reference in a new issue