-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
enhancementNew feature or requestNew feature or request
Description
全局缓存
作为项目级别存储:

实际存储NAS路径 为: /mnt/auto/cache
项目级别缓存
- 自定义模式
cache:
paths:
- ./node-modules
- ./public
key: npm-${{ hashFiles('package-lock.json') }}
问题1: 如何存储数据
将 ./node-modules,./public 分别存入 /mnt/auto/${appName}/${key} 文件下
问题2: 什么时机进行数据存储
识别如果是 cache的步骤, onComplete 添加默认 存储的步骤
问题3: 缓存什么时候生效
默认在onInit 阶段生效
问题4: 缓存如何生效?
默认以软链形式进行生效,格式为 ln -s /mnt/auto/${appName}/${key}/node-modules node-modules
问题5: 软链冲突如何解决?
假设已经存在了 node_modules,如何处理冲突?
- 简单模式
cache:
npm: true
等于=>
cache:
paths:
- ./node-modules
key: npm-${{ hashFiles('package-lock.json') }}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request