File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ pipeline {
149
149
jdk " JDK 11.0.9"
150
150
}
151
151
environment {
152
+ sonar_branch = sh(returnStdout : true , script : " echo ${ GIT_BRANCH} | awk -F/ '{ print $2 }'" ). trim()
152
153
sonarscanner_config_file = " ${ sonarscanner_install_dir} /conf/sonar-scanner.properties"
153
154
electron_coverage = " ${ WORKSPACE} /electron/coverage/lcov.info"
154
155
webui_coverage = " ${ WORKSPACE} /webui/coverage/lcov.info"
@@ -169,6 +170,7 @@ pipeline {
169
170
echo "sonar.organization=${ sonar_org} " >> ${ sonarscanner_config_file}
170
171
echo "sonar.projectKey=${ sonar_project_key} " >> ${ sonarscanner_config_file}
171
172
echo "sonar.projectVersion=${ version_prefix} " >> ${ sonarscanner_config_file}
173
+ echo "sonar.branch=${ sonar_branch} " >> ${ sonarscanner_config_file}
172
174
echo "sonar.javascript.lcov.reportPaths=${ lcov_report_paths} " >> ${ sonarscanner_config_file}
173
175
echo "sonar.c.file.suffixes=-" >> ${ sonarscanner_config_file}
174
176
echo "sonar.cpp.file.suffixes=-" >> ${ sonarscanner_config_file}
You can’t perform that action at this time.
0 commit comments