I am using SonarSource/sonarcloud-github-action@master in Github Actions. I have setup a build using a self-hosted runner. All is working fine except that the sonarqube build dont find the sonar-project.properties. If i am using the Runner hosted by github, sonarqube find the file. The configuration is exact the same. The file is on both runners visible and readable.
Log of the failed build:
Run SonarSource/sonarcloud-github-action@master
with:
projectBaseDir: .
env:
SSH_AUTH_SOCK: /tmp/ssh-R8C3YtUZH7g4/agent.2099
SSH_AGENT_PID: 2100
GITHUB_TOKEN: ***
SONAR_TOKEN: ***
/usr/bin/docker run --name b1cbc55d9ffb630d634d4184edd31919b340d4_4fa637 --label b1cbc5 --workdir /github/workspace --rm -e SSH_AUTH_SOCK -e SSH_AGENT_PID -e GITHUB_TOKEN -e SONAR_TOKEN -e INPUT_PROJECTBASEDIR -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -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/***/***":"/github/workspace" b1cbc5:5d9ffb630d634d4184edd31919b340d4
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.3.0.2102
INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
INFO: Linux 4.15.0-96-generic amd64
INFO: User cache: /root/.sonar/cache
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarCloud
INFO: Default locale: "en_US", source code encoding: "US-ASCII" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=191ms
INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
INFO: User cache: /root/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=83ms
INFO: Load/download plugins (done) | time=21254ms
INFO: Loaded core extensions: developer-scanner
INFO: Process project properties
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 25.358s
ERROR: Error during SonarScanner execution
INFO: Final Memory: 6M/24M
ERROR: You must define the following mandatory properties for 'Unknown': sonar.projectKey, sonar.organization
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
INFO: ------------------------------------------------------------------------ ```
I cant find any solutions for that. Anyone has an idea?
Kind Regards