mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 15:25:49 +00:00
test
This commit is contained in:
parent
71f052ffc3
commit
18cd763891
1 changed files with 44 additions and 44 deletions
|
@ -1,49 +1,49 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Prepare') {
|
stage('Prepare') {
|
||||||
steps {
|
steps {
|
||||||
deleteDir()
|
deleteDir()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
stage('SCM') {
|
|
||||||
steps {
|
|
||||||
checkout scm
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Build') {
|
|
||||||
steps {
|
|
||||||
sh "./mvnw clean"
|
|
||||||
sh './mvnw compile'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('SonarQube Analysis') {
|
|
||||||
environment {
|
|
||||||
SCANNER_HOME = tool 'sonar-scanner'
|
|
||||||
NODEJS_HOME =tool "nodejs"
|
|
||||||
PATH = "${env.NODEJS_HOME}/bin:${env.PATH}"
|
|
||||||
def mvn = tool 'M3'
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
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('SCM') {
|
||||||
}
|
steps {
|
||||||
|
checkout scm
|
||||||
stage('Build JAR') {
|
}
|
||||||
steps {
|
}
|
||||||
sh "./mvnw clean"
|
stage('Build') {
|
||||||
sh "./mvnw compile"
|
steps {
|
||||||
sh './mvnw package'
|
sh './mvnw clean'
|
||||||
}
|
sh './mvnw compile'
|
||||||
post {
|
}
|
||||||
success {
|
}
|
||||||
archiveArtifacts 'target/*.jar'
|
|
||||||
|
stage('SonarQube Analysis') {
|
||||||
|
environment {
|
||||||
|
SCANNER_HOME = tool 'sonar-scanner'
|
||||||
|
NODEJS_HOME = tool 'nodejs'
|
||||||
|
PATH = "${env.NODEJS_HOME}/bin:${env.PATH}"
|
||||||
|
def mvn = tool 'M3'
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
withSonarQubeEnv('sq1') {
|
||||||
|
sh "${mvn}/bin/mvn sonar:sonar -Dsonar.projectKey=Web -Dsonar.projectName='Web2' -Dsonar.sources=src/ -Dsonar.java.binaries=target/classes/ -Dsonar.exclusions=src/test/java/****/*.java"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build JAR') {
|
||||||
|
steps {
|
||||||
|
sh './mvnw clean'
|
||||||
|
sh './mvnw compile'
|
||||||
|
sh './mvnw package'
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
success {
|
||||||
|
archiveArtifacts 'target/*.jar'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue