Hello,
I’m trying to run SonarCloud scan step using GitHub Actions on a Java project that is built using Ant. The repository is https://github.com/albertus82/earthquake-bulletin and the current workflow is https://github.com/albertus82/earthquake-bulletin/blob/ci/.github/workflows/ant.yml.
Unfortunately no scan is performed because of the following error: /opt/sonar-scanner/bin/sonar-scanner: 59: exec: /opt/hostedtoolcache/Java/8.0.222/x64/bin/java: not found
. I tried also different Java versions with no luck.
Details follow:
- ALM used: GitHub
- CI system used: GitHub Actions
- Scanner command used when applicable: N/A
- Languages of the repository: Java
- Only if the SonarCloud project is public, the URL: https://sonarcloud.io/dashboard?id=it.albertus%3Aearthquake-bulletin
- Error observed:
2019-10-01T16:26:35.6130674Z ##[group]Run sonarsource/sonarcloud-github-action@master
2019-10-01T16:26:35.6130936Z env:
2019-10-01T16:26:35.6131088Z JAVA_HOME: /opt/hostedtoolcache/Java/8.0.222/x64
2019-10-01T16:26:35.6131248Z JAVA_HOME_8.0.222_x64: /opt/hostedtoolcache/Java/8.0.222/x64
2019-10-01T16:26:35.6131502Z GITHUB_TOKEN: ***
2019-10-01T16:26:35.6131702Z SONAR_TOKEN: ***
2019-10-01T16:26:35.6131842Z ##[endgroup]
2019-10-01T16:26:35.6373220Z ##[command]/usr/bin/docker run --name bb818d9079d09e204373b63877595072f20d_e53ec4 --label 04bb81 --workdir /github/workspace --rm -e JAVA_HOME -e JAVA_HOME_8.0.222_x64 -e GITHUB_TOKEN -e SONAR_TOKEN -e HOME -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/earthquake-bulletin/earthquake-bulletin":"/github/workspace" 04bb81:8d9079d09e204373b63877595072f20d
2019-10-01T16:26:39.4243128Z /opt/sonar-scanner/bin/sonar-scanner: 59: exec: /opt/hostedtoolcache/Java/8.0.222/x64/bin/java: not found
2019-10-01T16:26:39.8315733Z ##[error]Docker run failed with exit code 127
- Steps to reproduce: look at https://github.com/albertus82/earthquake-bulletin/runs/243496491
- Potential workaround: none
Am I missing something?
Thank you a lot.