Provide option to use yarn without zero-install method
According to https://gitlab.com/to-be-continuous/node/-/blob/master/templates/gitlab-ci-node.yml?ref_type=heads#L640 the --immutable-cache
option gets passed to yarn
for every job.
The option makes yarn fail, when the cache would be modified (either because files would be added, or because they'd be removed). See https://yarnpkg.com/cli/install#details
For me this seems, as if i am forced to use zero installs with yarn and therefore commit the node_modules
to git. https://yarnpkg.com/features/caching#zero-installs
I would be happy if there is another way instead of zero installs. Currently I see two options:
- create a dedicated job to setup the cache beforehand
- allow the
yarn install
command to be overwritten
Edited by Simon Weimann