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/web-trigger.md
View on GitHub# 手动触发:web_trigger(按钮/参数/选择目标构建)
## 1) 配置文件
手动触发按钮配置文件固定为:`.cnb/web_trigger.yml`
注意:该文件 **不支持** `include` 与 `imports`。
## 2) 分支与按钮
`branches` 下每一项用正则 `branch` 匹配分支,并声明 `buttons`:
```yaml
branches:
- name: development
branch: "develop"
buttons:
- id: deploy
name: "部署"
desc: "部署到测试环境"
env:
APP_NAME: "{{ .INPUT_APP_NAME }}"
inputs:
- id: app_name
name: "应用名"
type: string
required: true
```
要点:
- button 的触发事件为:`web_trigger_<id>`(如 `web_trigger_deploy`)。
- inputs 通过 `{{ .INPUT_<ID> }}` 引用(ID 通常会转成大写并用下划线连接)。
## 3) `.cnb.yml` 中接事件
```yaml
main:
web_trigger_deploy:
- stages:
- jobs:
- script:
- echo "deploy"
```
## 4) 高级:选择目标构建(targets)
按钮支持让用户选择“要部署的目标构建”(例如选择某个分支最近一次构建结果)。配置 `targets` 后,触发时会自动注入一组环境变量:
- `CNB_TRIGGER_TARGET_BUILD_ID`
- `CNB_TRIGGER_TARGET_BUILD_NUMBER`
- `CNB_TRIGGER_TARGET_BRANCH`
- `CNB_TRIGGER_TARGET_EVENT`
- `CNB_TRIGGER_TARGET_COMMIT_ID`
- `CNB_TRIGGER_TARGET_COMMIT_MESSAGE`
- `CNB_TRIGGER_TARGET_COMMIT_AUTHOR`
当用户提出“部署某次构建/选择构建号/选择目标分支产物”这类需求时,优先考虑 targets。
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 |