I upgraded the SonarQube version to 24.12 this morning (using Docker and this image)
I also have a Github Action running on custom self-hosted runner that use the scanner each time a commit is done.
14:53:03.761 INFO SonarScanner CLI 6.1.0.4477
14:53:03.767 INFO Java 17.0.11 Eclipse Adoptium (64-bit)
14:53:03.769 INFO Linux 6.1.0-28-amd64 amd64
14:53:09.865 INFO JRE provisioning: os[linux], arch[x86_64]
14:53:14.889 INFO Communicating with SonarQube Server 24.12.0.100206
Since this morning, every scan fail like this :
java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /home/docker/actions-runner/_work/XXXXXX/.git/refs/remotes/origin/XXXX-des-heures-r??alis??es-(probl??me-sur-l'ann??e-de-prise-en-compte)
at java.base/sun.nio.fs.UnixPath.encode(Unknown Source)
at java.base/sun.nio.fs.UnixPath.<init>(Unknown Source)
at java.base/sun.nio.fs.UnixFileSystem.getPath(Unknown Source)
at java.base/java.io.File.toPath(Unknown Source)
at org.sonar.plugins.javascript.analysis.TsConfigProvider$LookupTsConfigProvider.tsconfigs(TsConfigProvider.java:208)
at org.sonar.plugins.javascript.analysis.TsConfigProvider.tsconfigs(TsConfigProvider.java:100)
at org.sonar.plugins.javascript.analysis.TsConfigProvider.getTsConfigs(TsConfigProvider.java:95)
at org.sonar.plugins.javascript.analysis.JsTsSensor.analyzeFiles(JsTsSensor.java:91)
at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:74)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:201)
at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:197)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:170)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:355)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:149)
at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:66)
at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:52)
I tried forcing locales to fr_FR but same error (and it was working before without doing anything)
export LANG=fr_FR.UTF-8
export LC_ALL=fr_FR.UTF-8
But it didn’t work
I also tried to upgrade to SonarScanner CLI 6.2.1.4610 without any success
Sure, i didn’t provide the whole analysis but here is a more extended version :
15:50:52.850 INFO Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
15:50:52.860 INFO Project root configuration file: NONE
15:50:52.906 INFO SonarScanner CLI 6.2.1.4610
15:50:52.910 INFO Java 17.0.12 Eclipse Adoptium (64-bit)
15:50:52.912 INFO Linux 6.1.0-28-amd64 amd64
15:50:52.991 INFO User cache: /home/docker/.sonar/cache
15:50:58.795 INFO JRE provisioning: os[linux], arch[x86_64]
15:51:05.021 INFO Communicating with SonarQube Server 24.12.0.100206
15:51:05.826 INFO Starting SonarScanner Engine...
15:51:05.828 INFO Java 17.0.11 Eclipse Adoptium (64-bit)
15:51:07.842 INFO Load global settings
15:51:12.418 INFO Load global settings (done) | time=4575ms
15:51:12.427 INFO Server id: 243B8A4D-AZCSyLmX61GiQtuW8fVL
15:51:12.455 INFO Loading required plugins
15:51:12.456 INFO Load plugins index
15:51:12.493 INFO Load plugins index (done) | time=36ms
15:51:12.494 INFO Load/download plugins
15:51:14.215 INFO Load/download plugins (done) | time=1721ms
15:51:14.948 INFO Process project properties
15:51:14.977 INFO Process project properties (done) | time=29ms
15:51:15.003 INFO Project key: ***
15:51:15.007 INFO Base dir: /home/docker/actions-runner/_work/EventSoft/EventSoft
15:51:15.008 INFO Working dir: /home/docker/actions-runner/_work/EventSoft/EventSoft/.scannerwork
15:51:15.035 INFO Load project settings for component key: '***'
15:51:15.080 INFO Load project settings for component key: '***' (done) | time=47ms
15:51:15.169 INFO Load project branches
15:51:15.212 INFO Load project branches (done) | time=43ms
15:51:15.214 INFO Load branch configuration
15:51:15.223 INFO Auto detected BRANCH configuration with source develop using com.github.mc1arke.sonarqube.plugin.scanner.autoconfiguration.GithubActionsAutoConfigurer
15:51:15.225 INFO Load branch configuration (done) | time=10ms
15:51:15.269 INFO Load quality profiles
15:51:15.374 INFO Load quality profiles (done) | time=105ms
15:51:15.399 INFO Auto-configuring with CI 'Github Actions'
15:51:15.455 INFO Load active rules
15:51:19.551 INFO Load active rules (done) | time=4096ms
15:51:19.565 INFO Load analysis cache
15:51:20.815 INFO Load analysis cache | time=1250ms
15:51:20.873 INFO Branch name: develop
15:51:20.875 WARN The property 'sonar.login' is deprecated and will be removed in the future. Please use the 'sonar.token' property instead when passing a token.
15:51:20.901 INFO Preprocessing files...
15:51:22.856 INFO 7 languages detected in 2381 preprocessed files
15:51:22.858 INFO 3 files ignored because of inclusion/exclusion patterns
15:51:22.859 INFO 2 files ignored because of scm ignore settings
15:51:22.863 INFO Loading plugins for detected languages
15:51:22.864 INFO Load/download plugins
15:51:25.651 INFO Load/download plugins (done) | time=2782ms
15:51:26.013 INFO Load project repositories
15:51:26.088 INFO Load project repositories (done) | time=74ms
15:51:26.124 INFO Indexing files...
15:51:26.126 INFO Project configuration:
15:51:26.126 INFO Excluded sources: xxxxxxxxxxx
15:51:26.127 INFO Excluded sources for coverage: **/*.*
15:51:38.836 INFO 2229 files indexed
15:51:38.842 INFO Quality profile for css: Sonar way
15:51:38.843 INFO Quality profile for js: Sonar way
15:51:38.844 INFO Quality profile for json: Sonar way
15:51:38.845 INFO Quality profile for php: Eventsoft
15:51:38.845 INFO Quality profile for web: Eventsoft
15:51:38.846 INFO Quality profile for xml: Sonar way
15:51:38.847 INFO ------------- Run sensors on module ***
15:51:38.989 INFO Load metrics repository
15:51:39.034 INFO Load metrics repository (done) | time=46ms
15:51:40.539 INFO Sensor HTML [web]
15:51:52.616 INFO Sensor HTML [web] (done) | time=12077ms
15:51:52.617 INFO Sensor XML Sensor [xml]
15:51:52.648 INFO 12 source files to be analyzed
15:51:53.920 INFO 12/12 source files have been analyzed
15:51:53.921 INFO Sensor XML Sensor [xml] (done) | time=1303ms
15:51:53.922 INFO Sensor JaCoCo XML Report Importer [jacoco]
15:51:53.924 INFO 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
15:51:53.925 INFO No report imported, no coverage information will be imported by JaCoCo XML Report Importer
15:51:53.926 INFO Sensor JaCoCo XML Report Importer [jacoco] (done) | time=6ms
15:51:53.927 INFO Sensor PHP sensor [php]
15:51:53.998 INFO Starting PHP symbol indexer
15:51:54.003 INFO 979 source files to be analyzed
15:52:04.006 INFO 21/979 files analyzed, current file: xxxxxx
...
15:56:24.025 INFO 907/979 files analyzed, current file: xxxxxx
15:56:33.648 INFO 979/979 source files have been analyzed
15:56:33.649 INFO Cached information of global symbols will be used for 0 out of 979 files. Global symbols were recomputed for the remaining files.
15:56:33.688 INFO Starting PHP rules
15:56:33.689 INFO 979 source files to be analyzed
15:56:43.691 INFO 19/979 files analyzed, current file: xxxxx
16:09:13.752 INFO 974/979 files analyzed, current file: xxxxxx
16:09:16.728 INFO 979/979 source files have been analyzed
16:09:16.729 INFO The PHP analyzer was able to leverage cached data from previous analyses for 0 out of 979 files. These files were not parsed.
16:09:16.729 INFO Sensor PHP sensor [php] (done) | time=1042803ms
16:09:16.729 INFO Sensor Analyzer for "php.ini" files [php]
16:09:16.750 INFO Sensor Analyzer for "php.ini" files [php] (done) | time=21ms
16:09:16.751 INFO Sensor PHPUnit report sensor [php]
16:09:16.753 INFO No PHPUnit tests reports provided (see 'sonar.php.tests.reportPath' property)
16:09:16.753 INFO No PHPUnit coverage reports provided (see 'sonar.php.coverage.reportPaths' property)
16:09:16.836 INFO Sensor PHPUnit report sensor [php] (done) | time=86ms
16:09:16.837 INFO Sensor IaC CloudFormation Sensor [iac]
16:09:16.903 INFO 0 source files to be analyzed
16:09:16.905 INFO 0/0 source files have been analyzed
16:09:16.906 INFO Sensor IaC CloudFormation Sensor [iac] (done) | time=67ms
16:09:16.906 INFO Sensor IaC AzureResourceManager Sensor [iac]
16:09:17.081 INFO 0 source files to be analyzed
16:09:17.082 INFO 0/0 source files have been analyzed
16:09:17.082 INFO Sensor IaC AzureResourceManager Sensor [iac] (done) | time=178ms
16:09:17.083 INFO Sensor Java Config Sensor [iac]
16:09:17.119 INFO 0 source files to be analyzed
16:09:17.119 INFO 0/0 source files have been analyzed
16:09:17.120 INFO Sensor Java Config Sensor [iac] (done) | time=37ms
16:09:17.120 INFO Sensor com.github.mc1arke.sonarqube.plugin.scanner.ScannerPullRequestPropertySensor
16:09:17.121 INFO Sensor com.github.mc1arke.sonarqube.plugin.scanner.ScannerPullRequestPropertySensor (done) | time=0ms
16:09:17.121 INFO Sensor JavaScript/TypeScript analysis [javascript]
16:09:17.411 INFO Detected os: Linux arch: amd64 alpine: false. Platform: LINUX_X64
16:09:17.412 INFO Deploy location /home/docker/.sonar/js/node-runtime, tagetRuntime: /home/docker/.sonar/js/node-runtime/node, version: /home/docker/.sonar/js/node-runtime/version.txt
16:09:26.363 INFO Using embedded Node.js runtime.
16:09:26.363 INFO Using Node.js executable: '/home/docker/.sonar/js/node-runtime/node'.
16:09:31.135 INFO Memory configuration: OS (32140 MB), Node.js (4144 MB).
16:09:35.323 WARN Access to the multi-values/property set property 'sonar.javascript.file.suffixes' should be made using 'getStringArray' method. The SonarQube plugin using this property should be updated.
16:09:35.324 WARN Access to the multi-values/property set property 'sonar.typescript.file.suffixes' should be made using 'getStringArray' method. The SonarQube plugin using this property should be updated.
16:09:35.965 ERROR Failure during analysis
java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /home/docker/actions-runner/_work/EventSoft/EventSoft/.git/refs/remotes/origin/xxxxx-r??alis??es-(probl??me-sur-l'ann??e-de-prise-en-compte)
at java.base/sun.nio.fs.UnixPath.encode(Unknown Source)
at java.base/sun.nio.fs.UnixPath.<init>(Unknown Source)
at java.base/sun.nio.fs.UnixFileSystem.getPath(Unknown Source)
at java.base/java.io.File.toPath(Unknown Source)
at org.sonar.plugins.javascript.analysis.TsConfigProvider$LookupTsConfigProvider.tsconfigs(TsConfigProvider.java:208)
16:09:35.966 INFO Hit the cache for 0 out of 0
16:09:35.967 INFO Miss the cache for 0 out of 0
at org.sonar.plugins.javascript.analysis.TsConfigProvider.tsconfigs(TsConfigProvider.java:100)
at org.sonar.plugins.javascript.analysis.TsConfigProvider.getTsConfigs(TsConfigProvider.java:95)
at org.sonar.plugins.javascript.analysis.JsTsSensor.analyzeFiles(JsTsSensor.java:91)
at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:74)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:201)
at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:197)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:170)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:355)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:149)
at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:66)
at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:52)
16:09:36.860 ERROR Error during SonarScanner Engine execution
java.lang.IllegalStateException: Analysis of JS/TS files failed
at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:99)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:201)
at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:197)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:170)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:355)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:149)
at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:66)
at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:52)
Caused by: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /home/docker/actions-runner/_work/EventSoft/EventSoft/.git/refs/remotes/origin/xxxxxx-r??alis??es-(probl??me-sur-l'ann??e-de-prise-en-compte)
at java.base/sun.nio.fs.UnixPath.encode(Unknown Source)
at java.base/sun.nio.fs.UnixPath.<init>(Unknown Source)
at java.base/sun.nio.fs.UnixFileSystem.getPath(Unknown Source)
at java.base/java.io.File.toPath(Unknown Source)
at org.sonar.plugins.javascript.analysis.TsConfigProvider$LookupTsConfigProvider.tsconfigs(TsConfigProvider.java:208)
at org.sonar.plugins.javascript.analysis.TsConfigProvider.tsconfigs(TsConfigProvider.java:100)
at org.sonar.plugins.javascript.analysis.TsConfigProvider.getTsConfigs(TsConfigProvider.java:95)
at org.sonar.plugins.javascript.analysis.JsTsSensor.analyzeFiles(JsTsSensor.java:91)
at org.sonar.plugins.javascript.analysis.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:74)
... 22 common frames omitted
16:09:37.332 INFO EXECUTION FAILURE
16:09:37.340 INFO Total time: 18:44.493s
Error: Process completed with exit code 3.
(old log without the -X parameter, do you still need a more detailled log ?)
Here is the github action file
name: CodeQuality (Sonarqube)
on:
push:
branches:
- master
- develop
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
jobs:
sonarqube:
name: Analyse du code
runs-on: [self-hosted, sonar]
steps:
- name: Set UTF-8 encoding
run: |
export LANG=fr_FR.UTF-8
export LC_ALL=fr_FR.UTF-8
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up SonarScanner analysis parameters
id: sonar_params
run: |
echo "SONAR_PROJECT_KEY=${{ secrets.SONAR_PROJECT_KEY }}" >> $GITHUB_ENV
echo "SONAR_HOST_URL=${{ secrets.SONAR_HOST_URL }}" >> $GITHUB_ENV
echo "SONAR_LOGIN=${{ secrets.SONAR_TOKEN }}" >> $GITHUB_ENV
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "SONAR_SCAN_PARAMS=-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} \
-Dsonar.pullrequest.branch=${{ github.head_ref }} \
-Dsonar.scm.provider=git \
-Dsonar.pullrequest.base=${{ github.base_ref }}" >> $GITHUB_ENV
else
echo "SONAR_SCAN_PARAMS=-Dsonar.branch.name=${{ github.ref_name }} \
-Dsonar.branch.target=develop" >> $GITHUB_ENV
fi
if [[ "${{ github.ref_name }}" == "develop" ]]; then
VERSION=$(cat version.txt)
echo "SONAR_SCAN_PARAMS=$SONAR_SCAN_PARAMS -Dsonar.projectVersion=$VERSION" >> $GITHUB_ENV
fi
- name: Run SonarScanner
run: |
sonar-scanner \
-Dsonar.projectKey=$SONAR_PROJECT_KEY \
-Dsonar.sources=. \
-Dsonar.host.url=$SONAR_HOST_URL \
-Dsonar.login=$SONAR_LOGIN \
$SONAR_SCAN_PARAMS
- name: Display report-task.txt content
run: |
echo "Content of report-task.txt:"
cat .scannerwork/report-task.txt
- name: Check SonarQube Quality Gate
id: check_quality_gate
run: |
MAX_RETRIES=15
RETRY_DELAY=15
RETRIES=0
QUALITY_GATE_STATUS=""
# Read the ceTaskUrl from the report-task.txt file
CE_TASK_URL=$(grep -oP 'ceTaskUrl=\K.*' .scannerwork/report-task.txt)
while [[ "$RETRIES" -lt "$MAX_RETRIES" ]]; do
STATUS_JSON=$(curl -s -u "${{ secrets.SONAR_TOKEN }}:" "$CE_TASK_URL")
QUALITY_GATE_STATUS=$(echo $STATUS_JSON | jq -r .task.status)
if [[ "$QUALITY_GATE_STATUS" == "SUCCESS" ]]; then
ANALYSIS_ID=$(echo $STATUS_JSON | jq -r .task.analysisId)
break
fi
echo "Quality Gate status is $QUALITY_GATE_STATUS, retrying in $RETRY_DELAY seconds..."
sleep $RETRY_DELAY
RETRIES=$((RETRIES+1))
done
if [[ "$RETRIES" -eq "$MAX_RETRIES" ]]; then
echo "Quality Gate check timed out after $((MAX_RETRIES * RETRY_DELAY)) seconds"
exit 1
fi
# Fetch Quality Gate status from SonarQube using the analysisId
PROJECT_STATUS=$(curl -s -u "${{ secrets.SONAR_TOKEN }}:" "${{ secrets.SONAR_HOST_URL }}/api/qualitygates/project_status?analysisId=${ANALYSIS_ID}")
QUALITY_GATE_STATUS=$(echo $PROJECT_STATUS | jq -r .projectStatus.status)
echo "Quality Gate Status: ${QUALITY_GATE_STATUS}"
if [[ "${QUALITY_GATE_STATUS}" != "OK" ]]; then
echo "Quality Gate failed: ${QUALITY_GATE_STATUS}"
exit 1
else
echo "Quality Gate passed"
fi
We made the github action ok by adding this part :
- name: Nettoyer les références Git
run: |
git fetch --prune
for ref in $(git for-each-ref --format="%(refname)" refs/remotes/origin/); do
sanitized=$(echo "$ref" | iconv -f UTF-8 -t ASCII//TRANSLIT | sed 's/[^a-zA-Z0-9/_-]//g')
if [ "$ref" != "$sanitized" ]; then
echo "Renommage local de $ref en $sanitized"
git update-ref -d "$ref"
fi
done
But i’m not sure it’s the right solution and not sure about all the impacts
It looks like you’ve found an acceptable workaround for now – and it probably isn’t causing any impact to your analysis, if the ref isn’t the branch being analzyed. Let’s see what our devs have to say.