Skip to content

feat: Create Recipe V2 schema#19

Merged
gmpinder merged 1 commit into
mainfrom
recipe-v2
Jun 12, 2026
Merged

feat: Create Recipe V2 schema#19
gmpinder merged 1 commit into
mainfrom
recipe-v2

Conversation

@gmpinder

@gmpinder gmpinder commented May 30, 2026

Copy link
Copy Markdown
Member

This PR adds the schema for Recipe V2 (a long time coming). This is based on the discussion in blue-build/cli#180.

Example:

version: 2
base:
  image:
    registry: ghcr.io
    repository: blue-build/base-images/fedora-base
    tag: 44
  # image: ghcr.io/blue-build/base-images/fedora-base:44 # Can  be defined as a string too
  public-key: https://raw.githubusercontent.com/blue-build/base-images/refs/heads/main/cosign.pub
metadata:
  name: test
  description: Test for recipe v2
  labels:
    'org.bluebuild.test': test value
spec:
  tags:
    - test
  platforms:
    - linux/amd64
    - linux/arm64
  tool-versions:
    bluebuild: main
modules:
# ....

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 30, 2026

Copy link
Copy Markdown

Deploying bluebuild-schema with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2ff2725
Status: ✅  Deploy successful!
Preview URL: https://b65f6d71.schema-e29.pages.dev
Branch Preview URL: https://recipe-v2.schema-e29.pages.dev

View logs

@gmpinder gmpinder force-pushed the recipe-v2 branch 3 times, most recently from e444fac to 450eebf Compare May 30, 2026 20:07
@xynydev

xynydev commented Jun 11, 2026

Copy link
Copy Markdown
Member

Seems great. I like that image can be both a string and an object. I would definitely recommend using the string for most humans, but for changing programmatically this is great!

The distinction between metadata and spec might be a bit confusing. For example, why are labels metadata but tags spec? Well, of course this is because tags are used to pull the image, and labels are just metadata. This is not a problem with the schema then I guess, just something that needs to be documented. And you have documented it. I'm just thinking out loud forgive me...

@xynydev xynydev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved!!!!! 🎉

@gmpinder

Copy link
Copy Markdown
Member Author

The distinction between metadata and spec might be a bit confusing. For example, why are labels metadata but tags spec? Well, of course this is because tags are used to pull the image, and labels are just metadata. This is not a problem with the schema then I guess, just something that needs to be documented. And you have documented it. I'm just thinking out loud forgive me...

I was kind of going back and forth about the tags being under spec versus metadata. The way I see it is that metadata is just information about the image and spec contains options for how to build the image. The tags themselves are kind of part of the build, but they don't really affect how the internal parts of the image are built, so I could go either way on that front.

@gmpinder gmpinder merged commit 75f9a47 into main Jun 12, 2026
1 check passed
@gmpinder gmpinder deleted the recipe-v2 branch June 12, 2026 21:27
gmpinder added a commit to blue-build/cli that referenced this pull request Jun 12, 2026
The implementation for Recipe V2. Schema changes are in
blue-build/schema#19.

Closes #180
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants