Community编程与开发github.com

本地构建与发布Kit

构建一个Bottlerocket kit并将其发布到本地托管的OCI注册表,用于开发测试。

本地构建与发布Kit 是什么?

该技能用于构建Bottlerocket kit(core-kit或kernel-kit)并将其发布到本地OCI注册表,以便进行开发测试和验证。它允许开发者在变体构建中测试kit更改,而无需发布到生产注册表。该技能适用于在kits/目录下的kit仓库中工作,需要Docker已安装并运行。通过步骤化流程,用户可以启动本地注册表、配置本地发布环境、构建kit并发布到localhost:5000。验证步骤确保kit已成功发布,并为后续变体构建提供依赖。常见问题包括注册表未运行、Infra.toml未配置和Docker权限问题,均提供了解决方案。支持x86_64和aarch64架构。该技能适用于Claude Code等AI代理平台,帮助开发者高效迭代kit开发。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/cbgbt/bottlerocket-forest/tree/main/skills/build-kit-locally

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

技能:构建并发布Kit

目的

构建一个Bottlerocket kit(core-kit或kernel-kit)并将其发布到本地OCI注册表,用于开发测试和验证。这允许你在变体构建中测试kit更改,而无需发布到生产注册表。

何时使用

  • 对kit包进行更改并在变体中进行测试
  • 对kit进行迭代开发
  • 在构建依赖于kit更改的变体镜像之前

先决条件

  • Docker已安装并运行
  • 在grove目录中工作
  • Kit仓库已克隆到kits/目录中

步骤

1. 确保本地注册表正在运行

brdev registry start

2. 配置本地注册表

cd kits/<kit-name>
brdev twoliter use-local-publish

这将创建指向本地注册表用于发布的Infra.toml。

3. 构建kit

make build

对于特定架构:

make build ARCH=x86_64
# 或
make build ARCH=aarch64

4. 发布到本地注册表

make publish VENDOR=local

这将kit发布到localhost:5000,供应商前缀为"local"。

5. 验证发布

brdev registry list

应显示你的kit在仓库列表中。

验证

检查kit是否可用:

brdev registry list

应返回已发布的版本标签。

常见问题

注册表未运行:

错误:连接被拒绝

解决方案:运行brdev registry start

Infra.toml未配置:

错误:未找到供应商'local'

解决方案:运行brdev twoliter use-local-publish以创建配置

Docker权限被拒绝: 解决方案:确保用户属于docker组且Docker守护进程正在运行

后续步骤

发布kit后:

  1. 更新变体的Twoliter.toml以引用新的kit版本
  2. 在变体仓库中运行make update
  3. 使用cargo make构建变体

Individual skills in this repo

This repo contains 19 individual skills — each has its own dedicated page.

ad-hoc-implementation-plan

Transform a rough plan into implement-commit ready artifacts. Allows rigorous review while implementing.

build-variant-from-local-kits

Build a variant using locally published kits for development validation

deep-research

Create educational documents that build understanding progressively with citations

edit-spec-file

Edit Bottlerocket RPM spec files following project style conventions

fact-find

Quick lookup of specific facts about Bottlerocket with citations

idea-honing

Clarify feature ideas through iterative Q&A, recording insights to guide concept development

implement-commit

Implement commits from an implementation plan using a TDD pipeline

local-registry

Start and manage a local OCI registry for Bottlerocket kit development

prepare-core-kit-release

Prepare bottlerocket-core-kit for release by bumping version and updating changelog

propose-feature-concept

Create a new feature concept document to pitch the idea and explain the problem/solution

propose-feature-design

Create or update feature technical design document with architecture and implementation guidance

propose-feature-requirements

Create or update feature requirements specification using EARS notation with examples and appendices

propose-feature-test-plan

Create a test plan mapping EARS requirements and Critical Constraints to specific tests

propose-implementation-plan

Create an implementation plan with atomic commits that build toward a complete feature

review-code

Deep code review generating PR comments via principled question-driven analysis

review-scope

Verify code changes match intended scope and requirements without exceeding boundaries

review-style

Verify code follows project style guides without providing improvement suggestions

test-local-twoliter

Build and test local changes to twoliter before releasing

update-twoliter

Update all Bottlerocket repositories to a new Twoliter version

相关技能