-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix permissions of .scannerwork directory (#57)
- Loading branch information
1 parent
5ee47de
commit e2a1ee7
Showing
3 changed files
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
_tmp_file=$(ls "${INPUT_PROJECTBASEDIR}/" | head -1) | ||
PERM=$(stat -c "%u:%g" "${INPUT_PROJECTBASEDIR}/$_tmp_file") | ||
|
||
chown -R $PERM "${INPUT_PROJECTBASEDIR}/" | ||
|
e2a1ee7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit seems break something during clean up. I got
Access to the path '/home/runner/work/_temp/_github_workflow/event.json' is denied.
onpost run
after this action.e2a1ee7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing happened with our pipelines @cody-simms-sonarsource
e2a1ee7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhaoyi0113 @adrian-livefront Interesting. Are you running this action on a self-hosted runner?
e2a1ee7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cody-simms-sonarsource no, the failing pipelines ran on Github hosted runners
To be clear, a rollback to Sonar
v2.0.2
fixed the issue.The failed logs have a couple hundred lines of read-only errors, here's an excerpt:
e2a1ee7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adrian-livefront thanks for the info, I'm looking into a fix now. One more question, are you providing any value for the
projectBaseDir
input arg? If so, could you share it?e2a1ee7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the runs in question,
projectBaseDir
was not used.e2a1ee7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adrian-livefront I've spent some time on this, but I have not been able to reproduce the issue. I think I have a fix but I'd like to make sure. Are you able to share the github workflow YAML file you're using?
e2a1ee7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I can not. But happy to verify concerns.
e2a1ee7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adrian-livefront @zhaoyi0113 we released version 2.1.1 of the action, please give it a try and let me know if the issues persist.
e2a1ee7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That did it, thanks for the quick fix @cody-simms-sonarsource!