We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3ce521 commit 8d55086Copy full SHA for 8d55086
src/org/devops/sonarqube.groovy
@@ -1,3 +1,21 @@
1
package org.devops
2
3
-def SonarScan(projectName,)
+def SonarScan(projectName,projectDesc,projectPath){
4
+ withSonarQubeEnv(credentialsId: 'SonaerServer-Admin') {
5
+ def scannerHome = "/usr/local/sonar-scanner"
6
+ def sonarDate = sh returnStdout: true, script: 'date +%Y%m%d%H%M%S'
7
+ sonarDate = sonarDate - "\n"
8
+
9
10
+ sh """
11
+ ${scannerHome}/bin/sonar-scanner -Dsonar.projectKey=${projectName} \
12
+ -Dsonar.projectName=${projectName} \
13
+ -Dsonar.projectVersion=${sonarDate} \
14
+ -Dsonar.ws.timeout=30 \
15
+ -Dsonar.projectDescription=${projectDesc} \
16
+ -Dsonar.language=php \
17
+ -Dsonar.dynamicAnalysis=false \
18
+ -Dsonar.sourceEncoding=UTF-8
19
+ """
20
+ }
21
+}
0 commit comments