Skip to content

Commit b973ccc

Browse files
committed
bypass withSonarQubeEnv
1 parent e635e60 commit b973ccc

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Jenkinsfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ pipeline {
2929
sonarscanner_zip_file = "sonar-scanner-cli-${sonarscanner_version}.zip"
3030
sonarscanner_download_url = "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/${sonarscanner_zip_file}"
3131

32+
sonar_url = 'https://sonarcloud.io'
33+
sonar_creds = 'ecnj_sonar_token'
3234
sonar_org = 'oracle'
3335
sonar_project_key = "${sonar_org}_weblogic-toolkit-ui"
3436
}
@@ -147,6 +149,7 @@ pipeline {
147149
jdk "JDK 11.0.9"
148150
}
149151
environment {
152+
sonar_login = credentials("${sonar_creds}")
150153
electron_coverage = "${WORKSPACE}/electron/coverage/lcov.info"
151154
webui_coverage = "${WORKSPACE}/webui/coverage/lcov.info"
152155
lcov_report_paths = "${electron_coverage},${webui_coverage}"
@@ -155,17 +158,20 @@ pipeline {
155158
echo "JAVA_HOME = ${JAVA_HOME}"
156159
sh "which java"
157160
sh "java -version"
158-
withSonarQubeEnv('SonarCloud') {
159-
sh """
160-
SONAR_SCANNER_OPTS="-server"; export SONAR_SCANNER_OPTS
161+
sh """
162+
SONAR_SCANNER_OPTS="-X -server"; export SONAR_SCANNER_OPTS
161163
${sonarscanner_exe} \
164+
-Dsonar.sourceEncoding=UTF-8 \
165+
-Dsonar.host.url=${sonar_url} \
166+
-Dsonar.login=${sonar_login} \
162167
-Dsonar.organization=${sonar_org} \
163168
-Dsonar.projectKey=${sonar_project_key} \
164169
-Dsonar.projectVersion=${version_prefix} \
165170
-Dsonar.branch.name=${BRANCH_NAME} \
166171
-Dsonar.javascript.lcov.reportPaths=${lcov_report_paths}
167172
"""
168-
}
173+
// withSonarQubeEnv('SonarCloud') {
174+
// }
169175
}
170176
}
171177
stage('Linux Run eslint') {

0 commit comments

Comments
 (0)