sonarsource/sonarcloud (v1.6) github action is not working.
/entrypoint.sh: line 24: sonar-scanner: command not found
Based on this discussion here, it seems to be a PATH issue and we think this breaks because of the github action used for spark-setup where updating path variables.
echo "PATH=$PATH:${sparkHome}/bin" >> $GITHUB_ENV
We use spark to run our unit tests.
We also tried two ways to add the SonarCloud env variables before the scan as follows.
echo "/opt/sonar-scanner/bin" >> $GITHUB_PATH
echo "/opt/nodejs/bin" >> $GITHUB_PATH
echo "SONAR_SCANNER_HOME=/opt/sonar-scanner" >> $GITHUB_ENV
echo "NODEJS_HOME=/opt/nodejs" >> $GITHUB_ENV
echo "PATH=$PATH:${SONAR_SCANNER_HOME}/bin:${NODEJS_HOME}/bin" >> $GITHUB_ENV
But either of them didn’t work. Is there any workaround for this?
Also, need to know whether there is any way to build sonar-cloud docker file after running other steps in the workflow including unit tests.
Currently, we noticed that the build occurs right away after the job setup as follows.
Any comments and suggestions are appreciated.