Page MenuHomeSoftware Heritage

sphinx: Fix the creation of the pre-commit file during the mr update

Authored by vsellier on Tue, May 4, 7:00 PM.



Change the default permission of the ~jenkins/.cache directory
created by the --mount option on the RUN command
It fixes all the following errors:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jenkins/.local/bin/pre-commit", line 10, in <module>
  File "/home/jenkins/.local/lib/python3.7/site-packages/pre_commit/", line 398, in main
    f'Command {args.command} failed to exit with a returncode',
  File "/usr/lib/python3.7/", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/jenkins/.local/lib/python3.7/site-packages/pre_commit/", line 73, in error_handler
    _log_and_exit(msg, ret_code, e, traceback.format_exc())
  File "/home/jenkins/.local/lib/python3.7/site-packages/pre_commit/", line 24, in _log_and_exit
    storedir = Store().directory
  File "/home/jenkins/.local/lib/python3.7/site-packages/pre_commit/", line 52, in __init__
    os.makedirs(, exist_ok=True)
  File "/usr/lib/python3.7/", line 221, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/jenkins/.cache/pre-commit'
Test Plan
docker run --rm -ti --entrypoint bash swh-jenkins/sphinx
mkdir ~/workspace
cd ~/workspace
git clone
mr -j 4 -t update

there is no more errors

Diff Detail

rCDFJ Dockerfiles for Jenkins
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vsellier created this revision.
ardumont added a subscriber: ardumont.


Less warnings to distract us when something goes wrong in the build.

This revision is now accepted and ready to land.Wed, May 5, 9:10 AM