First attempt at running SonarQube scanner in a GitHub workflow. I noticed the post cache processing is throwing a warning:
Post job cleanup.
C:\Windows\System32\tar.exe -cz -f D:/a/_temp/4531dcae-9e9c-4a0d-97b9-8d1b5060e60c/cache.tgz -C C:/Users/runneradmin/sonar/cache .
tar.exe: could not chdir to 'C:/Users/runneradmin/sonar/cache'
Warning: Tar failed with error: The process 'C:\Windows\System32\tar.exe' failed with exit code 1
I changed the path from “~\sonar\cache” to “..sonar\cache” and resolved the warning, but wondering if the warning implies that something is not set up with proper permissions?
I’m not attempting to use the directory. These look like implicitly added cache cleanup steps. I added the “SonarScanner for .NET” example code from the link above with no modifications. After the “Build and Analyze” step (the last step explicitly defined) I see two additional steps: “Post Cache SonarQube scanner”, and “Post Cache SonarQube packages”.
Maybe I should be posting this under the actions/cache repo instead. I was curious if anyone else was having the same issue with that example.
Correct, the issue is with the caching step. I’m using the “SonarScanner for .Net” example found here: GitHub integration (sonarsource.com) which includes the caching step.
I was hoping someone could attempt to repro and let me know the results either in a new repo or after clearing the cache. If it’s reproducible the example should be updated.
This is a typo in our documentation. The path should be ~/.sonar/cache, not ~/sonar/cache (notice the period . in front of .sonar). We’ll update the docs ASAP and fix the in-app tutorials.