test: add manifests for bootc.install-to-filesystem

This commit adds example manifests for a bootc.install-to-filesystem
system. It does not do more with them because running a full test
requires a working podman which is difficult to use inside our
GH runners that are already running inside docker.
This commit is contained in:
Michael Vogt 2024-01-29 17:41:44 +01:00 committed by Achilleas Koutsou
parent 7dede7746d
commit c0f670f035
3 changed files with 330 additions and 10 deletions

View file

@ -0,0 +1,204 @@
{
"version": "2",
"pipelines": [
{
"name": "build",
"stages": [
{
"type": "org.osbuild.container-deploy",
"inputs": {
"images": {
"type": "org.osbuild.containers",
"origin": "org.osbuild.source",
"references": {
"sha256:129c330a79048413e9609b2ddc808522905e4277f0ceaa79cd84be2ec773f495": {
"name": "registry.gitlab.com/redhat/services/products/image-builder/ci/images/centos-bootc-dev:stream9"
}
}
}
}
},
{
"type": "org.osbuild.selinux",
"options": {
"file_contexts": "etc/selinux/targeted/contexts/files/file_contexts",
"labels": {
"/usr/bin/bootc": "system_u:object_r:install_exec_t:s0",
"/usr/bin/ostree": "system_u:object_r:install_exec_t:s0"
}
}
}
]
},
{
"name": "image",
"build": "name:build",
"stages": [
{
"type": "org.osbuild.truncate",
"options": {
"filename": "disk.img",
"size": "5368709120"
}
},
{
"type": "org.osbuild.sfdisk",
"options": {
"label": "gpt",
"uuid": "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
"partitions": [
{
"bootable": true,
"size": 2048,
"start": 2048,
"type": "21686148-6449-6E6F-744E-656564454649",
"uuid": "FAC7F1FB-3E8D-4137-A512-961DE09A5549"
},
{
"size": 409600,
"start": 4096,
"type": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B",
"uuid": "68B2905B-DF3E-4FB3-80FA-49D1E773AA33"
},
{
"size": 1024000,
"start": 413696,
"type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
"uuid": "CB07C243-BC44-4717-853E-28852021225B"
},
{
"size": 9048031,
"start": 1437696,
"type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
"uuid": "6264D520-3FB9-423F-8AB8-7A0A8E3D3562"
}
]
},
"devices": {
"device": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"lock": true
}
}
}
},
{
"type": "org.osbuild.mkfs.fat",
"options": {
"volid": "7B7795E7"
},
"devices": {
"device": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": 4096,
"size": 409600,
"lock": true
}
}
}
},
{
"type": "org.osbuild.mkfs.ext4",
"options": {
"uuid": "0194fdc2-fa2f-4cc0-81d3-ff12045b73c8",
"label": "boot"
},
"devices": {
"device": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": 413696,
"size": 1024000,
"lock": true
}
}
}
},
{
"type": "org.osbuild.mkfs.ext4",
"options": {
"uuid": "6e4ff95f-f662-45ee-a82a-bdf44a2d0b75",
"label": "root"
},
"devices": {
"device": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": 1437696,
"size": 9048031,
"lock": true
}
}
}
},
{
"type": "org.osbuild.bootc.install-to-filesystem",
"inputs": {
"images": {
"type": "org.osbuild.containers",
"origin": "org.osbuild.source",
"references": {
"sha256:129c330a79048413e9609b2ddc808522905e4277f0ceaa79cd84be2ec773f495": {
"name": "registry.gitlab.com/redhat/services/products/image-builder/ci/images/centos-bootc-dev:stream9"
}
}
}
},
"devices": {
"disk": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"partscan": true
}
}
},
"mounts": [
{
"name": "root",
"type": "org.osbuild.ext4",
"source": "disk",
"partition": 4,
"target": "/"
},
{
"name": "boot",
"type": "org.osbuild.ext4",
"source": "disk",
"partition": 3,
"target": "/boot"
},
{
"name": "boot.efi",
"type": "org.osbuild.fat",
"partition": 2,
"source": "disk",
"target": "/boot/efi"
}
]
}
]
}
],
"sources": {
"org.osbuild.curl": {
"items": {}
},
"org.osbuild.skopeo": {
"items": {
"sha256:129c330a79048413e9609b2ddc808522905e4277f0ceaa79cd84be2ec773f495": {
"image": {
"name": "registry.gitlab.com/redhat/services/products/image-builder/ci/images/centos-bootc-dev",
"digest": "sha256:11fbc536fad3ae9c95602a76f38d3f61c345da7610ef496f0198b045f1463fe4"
}
}
}
}
}
}

View file

@ -0,0 +1,120 @@
version: '2'
pipelines:
- name: build
stages:
- type: org.osbuild.container-deploy
inputs:
images:
type: org.osbuild.containers
origin: org.osbuild.source
mpp-resolve-images:
images:
- source: registry.gitlab.com/redhat/services/products/image-builder/ci/images/centos-bootc-dev
tag: "stream9"
- type: org.osbuild.selinux
options:
file_contexts: etc/selinux/targeted/contexts/files/file_contexts
labels:
/usr/bin/bootc: system_u:object_r:install_exec_t:s0
/usr/bin/ostree: system_u:object_r:install_exec_t:s0
- name: image
build: name:build
stages:
- type: org.osbuild.truncate
options:
filename: disk.img
size: '5368709120'
- type: org.osbuild.sfdisk
options:
label: gpt
uuid: D209C89E-EA5E-4FBD-B161-B461CCE297E0
partitions:
- bootable: true
size: 2048
start: 2048
type: 21686148-6449-6E6F-744E-656564454649
uuid: FAC7F1FB-3E8D-4137-A512-961DE09A5549
- size: 409600
start: 4096
type: C12A7328-F81F-11D2-BA4B-00A0C93EC93B
uuid: 68B2905B-DF3E-4FB3-80FA-49D1E773AA33
- size: 1024000
start: 413696
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
uuid: CB07C243-BC44-4717-853E-28852021225B
- size: 9048031
start: 1437696
type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
uuid: 6264D520-3FB9-423F-8AB8-7A0A8E3D3562
devices:
device:
type: org.osbuild.loopback
options:
filename: disk.img
lock: true
- type: org.osbuild.mkfs.fat
options:
volid: 7B7795E7
devices:
device:
type: org.osbuild.loopback
options:
filename: disk.img
start: 4096
size: 409600
lock: true
- type: org.osbuild.mkfs.ext4
options:
uuid: 0194fdc2-fa2f-4cc0-81d3-ff12045b73c8
label: boot
devices:
device:
type: org.osbuild.loopback
options:
filename: disk.img
start: 413696
size: 1024000
lock: true
- type: org.osbuild.mkfs.ext4
options:
uuid: 6e4ff95f-f662-45ee-a82a-bdf44a2d0b75
label: root
devices:
device:
type: org.osbuild.loopback
options:
filename: disk.img
start: 1437696
size: 9048031
lock: true
- type: org.osbuild.bootc.install-to-filesystem
inputs:
images:
type: org.osbuild.containers
origin: org.osbuild.source
mpp-resolve-images:
images:
- source: registry.gitlab.com/redhat/services/products/image-builder/ci/images/centos-bootc-dev
tag: "stream9"
devices:
disk:
type: org.osbuild.loopback
options:
filename: disk.img
partscan: true
mounts:
- name: root
type: org.osbuild.ext4
source: disk
partition: 4
target: /
- name: boot
type: org.osbuild.ext4
source: disk
partition: 3
target: /boot
- name: boot.efi
type: org.osbuild.fat
partition: 2
source: disk
target: /boot/efi