northseadl/norix-skills / cnb-cool-integration
cnb-cool-integration
Verified针对 cnb.cool 的云原生构建(CNB Build):生成/修改 .cnb.yml 流水线、触发规则、 构建环境、runner 资源、缓存、环境变量、手动触发与调试。 在接入、迁移、优化或排查 CNB 构建配置时使用。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.7 KB |
| agents/openai.yaml | config | 350 B |
| references/cache.md | markdown | 1.4 KB |
| references/cnb-yml.md | markdown | 1.3 KB |
| references/debug.md | markdown | 555 B |
| references/docker-and-runner.md | markdown | 2.2 KB |
| references/env.md | markdown | 876 B |
| references/file-reference.md | markdown | 1.4 KB |
| references/intro.md | markdown | 1.5 KB |
| references/recipes.md | markdown | 1.5 KB |
| references/trigger-rule.md | markdown | 1.1 KB |
| references/web-trigger.md | markdown | 1.6 KB |
references/cache.md
View on GitHub# 缓存:volumes 与跨节点缓存(docker:cache)
## 1) volumes:同一构建节点内缓存(首选)
思路:把依赖缓存与编译缓存放到 `docker.volumes` 指向的目录中,并在脚本里显式使用它。
```yaml
docker:
image: cnbcool/default:node
volumes:
cache: /cache
stages:
- jobs:
- name: test
script:
- export NPM_CONFIG_CACHE=/cache/npm
- npm ci
```
关键点:
- 挂载路径要稳定(路径变了就相当于换了缓存)。
- CNB 对 volumes 使用 copy-on-write:stage 开始复制上一 stage 的卷快照,stage 结束生成新快照。
## 2) pipeline cache:多节点并行下的“共享卷”思路
当 pipeline 分发到多个节点并行执行时,可以把多个缓存目录统一放到同一个卷(例如 `/cache/node`、`/cache/code`),并在不同 jobs 里各取所需。
## 3) 跨节点缓存:docker cache 镜像 + `docker:cache`
当你需要“不同构建节点之间”共享缓存时(例如构建会被调度到不同机器),可以考虑:
- 配置一个用于存放缓存内容的 Docker 镜像(作为 cache carrier)
- 在流水线里加入内置任务 `docker:cache`,完成缓存的 pull/push
注意:跨节点缓存通常需要额外的 registry 权限与合理的 cache key 设计;优先把 volumes 用对、把目录放对,再考虑跨节点缓存。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |