Staging instance, all changes can be removed at any time

Skip to content

jobs/templates: Fix cypress jobs after Jenkins upgrade

/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
Arguments: 
Directory: /home/jenkins/workspace/DWAPPS/cypress/node_modules/cypress
Output:
Cypress cannot write to the cache directory due to file permissions

See discussion and possible solutions at
https://github.com/cypress-io/cypress/issues/1281

----------

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.


Migrated from D2904 (view on Phabricator)

Merge request reports

Loading