This commit is contained in:
Zohar 2024-04-07 18:53:02 -04:00
parent 7da24c642f
commit cf90c619c1

View file

@ -1,4 +1,8 @@
node { node {
agent any
tools {
nodejs "node" // The name you gave in the Global Tool Configuration
}
stage('SCM') { stage('SCM') {
checkout scm checkout scm
} }
@ -8,11 +12,12 @@ node {
} }
stage('SonarQube Analysis') { stage('SonarQube Analysis') {
environment{ environment{
SCANNER_HOME = tool 'sonar-scanner' SCANNER_HOME = tool 'sonar-scanner'
} }
def mvn = tool 'M3'; def mvn = tool 'M3';
withSonarQubeEnv("sq1") { 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,**/*.html,**/*.js,**/*.css, **/*.html.js" 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"
} }
} }
} }