SQSCANGHA-27 Use GHA debug logging with scanner
This commit is contained in:
parent
d3ca1743de
commit
9bea6a46af
|
@ -134,3 +134,21 @@ jobs:
|
||||||
- name: Assert
|
- name: Assert
|
||||||
run: |
|
run: |
|
||||||
./test/assertFileExists ./test/example-project/.scannerwork/report-task.txt
|
./test/assertFileExists ./test/example-project/.scannerwork/report-task.txt
|
||||||
|
runnerDebugUsedTest:
|
||||||
|
name: >
|
||||||
|
'RUNNER_DEBUG' is used
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Run action with debug mode
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
args: -Dsonar.scanner.dumpToFile=./output.properties
|
||||||
|
env:
|
||||||
|
RUNNER_DEBUG: 1
|
||||||
|
SONAR_HOST_URL: http://not_actually_used
|
||||||
|
- name: Assert
|
||||||
|
run: |
|
||||||
|
./test/assertFileContains ./output.properties "sonar.verbose=true"
|
||||||
|
|
|
@ -30,7 +30,12 @@ if [[ -f "${INPUT_PROJECTBASEDIR%/}/build.gradle" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
debug_flag=''
|
||||||
|
if [[ "$RUNNER_DEBUG" == '1' ]]; then
|
||||||
|
debug_flag='--debug'
|
||||||
|
fi
|
||||||
|
|
||||||
unset JAVA_HOME
|
unset JAVA_HOME
|
||||||
|
|
||||||
sonar-scanner -Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} ${INPUT_ARGS}
|
sonar-scanner $debug_flag -Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} ${INPUT_ARGS}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue