Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 45 additions & 4 deletions .claude/skills/test-bootc-build/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,27 @@ REGISTRY_PASSWORD="${REGISTRY_PASSWORD:-$(cat registry-pass 2>/dev/null)}"

### 5. Submit Build with Download

The `build` command creates a bootc container image and optionally a disk image.

```bash
BUILD_NAME="$ARGUMENTS"
PUSH_IMAGE="${BOOTC_REGISTRY}:latest"
DISK_IMAGE="${BOOTC_REGISTRY}:latest-disk"
OUTPUT_FILE="./output/${BUILD_NAME}.qcow2"

bin/caib build-bootc simple.aib.yml \
bin/caib build simple.aib.yml \
--server "$CAIB_SERVER" \
--token "$TOKEN" \
--name "$BUILD_NAME" \
--arch arm64 \
--target qemu \
--push "$PUSH_IMAGE" \
--build-disk-image \
--disk \
--format qcow2 \
--export-oci "$DISK_IMAGE" \
--download "$OUTPUT_FILE" \
--push-disk "$DISK_IMAGE" \
--output "$OUTPUT_FILE" \
--registry-username "$REGISTRY_USERNAME" \
--registry-password "$REGISTRY_PASSWORD" \
--follow
```

Expand Down Expand Up @@ -121,13 +125,50 @@ Provide a summary with:
- If failed: the specific error and relevant log snippets
- Suggestions for fixes based on the error type

## CLI Command Reference

### build (bootc - default)
Creates a bootc container image from an AIB manifest.

```bash
caib build <manifest.aib.yml> \
--push <registry/image:tag> # Required: push container to registry
--disk # Also build disk image from container
--format <qcow2|raw|simg> # Disk image format (default: qcow2)
--push-disk <registry/img:tag> # Push disk as OCI artifact
--output <file> # Download disk image to file
--follow # Follow build logs
--wait # Wait for build to complete
```

### disk
Creates a disk image from an existing bootc container.

```bash
caib disk <container-ref> \
--push <registry/image:tag> # Push disk as OCI artifact
--output <file> # Download disk image to file
--format <qcow2|raw|simg> # Disk format (default: qcow2)
```

### build-legacy
Traditional ostree/package-based builds (for backwards compatibility).

```bash
caib build-legacy <manifest.aib.yml> \
--mode <image|package> # Required: build mode
--format <qcow2|raw|simg> # Required: export format
--name <build-name> # Required: build name
```

## Common Error Patterns

- "Builder image not found" - prepare-builder task failed or result not passed
- "containers-storage: invalid reference" - skopeo copy using wrong format
- "setfiles: Operation not supported" - SELinux context issues in osbuild
- "unauthorized" - Token or registry auth issues
- "BOOTC_REGISTRY not set" - Environment variable missing
- "container-ref is required for disk mode" - Missing container reference for disk command

## Alternative: Download Only (for completed builds)

Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha1/imagebuild_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ type ImageBuildSpec struct {

// BuilderImage is a custom builder image to use
BuilderImage string `json:"builderImage,omitempty"`

// ContainerRef is the reference to an existing bootc container image
// Used with mode=disk to create a disk image from an existing container
ContainerRef string `json:"containerRef,omitempty"`
}

// Publishers defines the configuration for artifact publishing
Expand Down
4 changes: 0 additions & 4 deletions bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=automotive-dev-operator
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.42.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4
Expand All @@ -15,9 +14,6 @@ LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/

# OpenShift labels
LABEL com.redhat.openshift.versions="v4.17"

# Copy files to locations specified by labels.
COPY bundle/manifests /manifests/
COPY bundle/metadata /metadata/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,10 @@ metadata:
capabilities: Basic Install
categories: Developer Tools
containerImage: quay.io/rh-sdv-cloud/automotive-dev-operator:latest
createdAt: "2026-01-04T16:02:41Z"
createdAt: "2026-01-09T13:33:39Z"
operatorframework.io/suggested-namespace: automotive-dev-operator-system
operators.operatorframework.io/builder: operator-sdk-v1.42.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
operators.openshift.io/infrastructure-features: '["disconnected"]'
operators.openshift.io/valid-subscription: '["OpenShift Container Platform"]'
repository: https://github.com/centos-automotive-suite/automotive-dev-operator
support: Red Hat
name: automotive-dev-operator.v0.0.1
Expand All @@ -67,6 +65,9 @@ spec:
apiservicedefinitions: {}
customresourcedefinitions:
owned:
- kind: CatalogImage
name: catalogimages.automotive.sdv.cloud.redhat.com
version: v1alpha1
- description: ImageBuild is the Schema for the imagebuilds API
displayName: Image Build
kind: ImageBuild
Expand All @@ -82,29 +83,7 @@ spec:
kind: OperatorConfig
name: operatorconfigs.automotive.sdv.cloud.redhat.com
version: v1alpha1
description: |
The CentOS Automotive Suite Operator provides a Kubernetes-native way to build automotive OS images on OpenShift.

## Features

* **ImageBuild Custom Resource**: Define and trigger automotive OS image builds declaratively
* **Multiple Build Modes**: Support for traditional AIB manifests and bootc container builds
* **Web UI**: Optional web interface for managing builds and viewing artifacts
* **Artifact Management**: Serve built images via Routes or push to OCI registries

## Prerequisites

* OpenShift Pipelines Operator (Tekton) must be installed

## Getting Started

1. Install the operator from OperatorHub
2. Create an OperatorConfig resource to configure the operator
3. Create an ImageBuild resource to trigger a build

## Documentation

For detailed documentation, visit the [project repository](https://github.com/centos-automotive-suite/automotive-dev-operator).
description: CentOS Automotive Suite
displayName: CentOS Automotive Suite
icon:
- base64data: ""
Expand Down Expand Up @@ -318,8 +297,8 @@ spec:
fieldRef:
fieldPath: metadata.namespace
- name: OPERATOR_IMAGE
value: quay.io/rh-sdv-cloud/automotive-dev-operator:latest
image: quay.io/rh-sdv-cloud/automotive-dev-operator:latest
value: image-registry.openshift-image-registry.svc:5000/automotive-dev-operator-system/automotive-dev-operator:latest
image: default-route-openshift-image-registry.apps.automotive1.ocp.automotive.sig.centos.org/automotive-dev-operator-system/automotive-dev-operator:latest
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
Expand Down Expand Up @@ -357,7 +336,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/rh-sdv-cloud/automotive-dev-operator:latest
image: default-route-openshift-image-registry.apps.automotive1.ocp.automotive.sig.centos.org/automotive-dev-operator-system/automotive-dev-operator:latest
imagePullPolicy: IfNotPresent
name: init-oauth-secrets
resources:
Expand Down Expand Up @@ -429,7 +408,4 @@ spec:
minKubeVersion: 1.26.0
provider:
name: Red Hat
relatedImages:
- image: quay.io/rh-sdv-cloud/automotive-dev-operator:latest
name: manager
version: 0.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,9 @@ spec:
description: Metadata contains automotive-specific image metadata
properties:
architecture:
description: Architecture is the CPU architecture (amd64, arm64)
enum:
- amd64
- arm64
- x86_64
- aarch64
description: |-
Architecture is the CPU architecture
Supports both AIB canonical values (x86_64, aarch64) and OCI standard names (amd64, arm64)
type: string
bootc:
description: Bootc indicates if this is a bootc-compatible image
Expand All @@ -98,11 +95,19 @@ spec:
- package
type: string
distro:
description: Distro is the distribution identifier (cs9, autosd10-sig)
description: |-
Distro is the distribution identifier
Common values include: cs9, autosd10-sig, autosd9, cs8, fedora-39, fedora-40, rhel9, rhel8
Run 'aib list-dist' to see all available distributions
type: string
distroVersion:
description: DistroVersion is the distribution version
type: string
exportFormat:
description: |-
ExportFormat indicates the disk image format produced by AIB
Common values include: qcow2, raw, image, vmdk, iso, vhd, tar
type: string
os:
default: linux
description: OS is the operating system (defaults to linux)
Expand All @@ -114,8 +119,10 @@ spec:
image supports
properties:
name:
description: Name is the target hardware identifier (qemu,
raspberry-pi, beaglebone)
description: |-
Name is the target hardware identifier
Common values include: qemu, raspberry-pi, beaglebone, generic
Run 'aib list-targets' to see all available hardware targets
type: string
notes:
description: Notes contains target-specific information
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ spec:
description: ContainerPush is the registry URL to push the bootc container
image
type: string
containerRef:
description: |-
ContainerRef is the reference to an existing bootc container image
Used with mode=disk to create a disk image from an existing container
type: string
distro:
description: Distro specifies the distribution to build for (e.g.,
"cs9")
Expand Down
4 changes: 0 additions & 4 deletions bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@ annotations:
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: automotive-dev-operator
operators.operatorframework.io.bundle.channels.v1: alpha
operators.operatorframework.io.bundle.channel.default.v1: alpha
operators.operatorframework.io.metrics.builder: operator-sdk-v1.42.0
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v4

# Annotations for testing.
operators.operatorframework.io.test.mediatype.v1: scorecard+v1
operators.operatorframework.io.test.config.v1: tests/scorecard/

# OpenShift annotations
com.redhat.openshift.versions: "v4.17"
Loading
Loading