Page MenuHomeSoftware Heritage

jobs/templates: Fix cypress jobs after Jenkins upgrade

Authored by anlambert on Mar 27 2020, 12:01 PM.



/home/jenkins/.cache is no more writable since last Jenkins upgrade.

pip and yarn automatically adapt their cache location:

WARNING: The directory '/home/jenkins/.cache/pip' or its parent directory is not owned 
or is not writable by the current user. The cache has been disabled. Check the permissions 
and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

warning Skipping preferred cache folder "/home/jenkins/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".

but cypress do not:

error /home/jenkins/workspace/DWAPPS/cypress/node_modules/cypress: Command failed.
Exit code: 1
Command: node index.js --exec install
Directory: /home/jenkins/workspace/DWAPPS/cypress/node_modules/cypress
Cypress cannot write to the cache directory due to file permissions

See discussion and possible solutions at


Failed to access /home/jenkins/.cache/Cypress:

EACCES: permission denied, mkdir '/home/jenkins/.cache/Cypress'

so set CYPRESS_CACHE_FOLDER environment variable to workaround the issue.

Diff Detail

rCJSWH Jenkins jobs
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.