Skip to content
Open
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
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@
earth bootstrap
earth --ci -P ./integration-tests+all

next-gen-build:
uses: ./.github/workflows/run-test.yml
secrets:
TEST_SIGNING_SECRET: ${{ secrets.TEST_SIGNING_SECRET }}
with:
repo: ${{ inputs.repo }}
ref: ${{ inputs.ref }}
fork_pr: ${{ inputs.fork_pr }}
pr_event_number: ${{ inputs.pr_event_number }}
install_cosign: ${{ ! inputs.fork_pr }}
install_docker: true
run: test-next-gen-build

docker-build:
uses: ./.github/workflows/run-test.yml
secrets:
Expand Down
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ blue-build-recipe = { version = "=0.9.37", path = "./recipe" }
blue-build-template = { version = "=0.9.37", path = "./template" }
blue-build-utils = { version = "=0.9.37", path = "./utils" }
blue-build-process-management = { version = "=0.9.37", path = "./process" }
blue-build-next-builder = { version = "=0.9.37", path = "./next" }
blue-build-next-builder = { version = "=0.9.37", path = "./next", optional = true }
clap-verbosity-flag = "=3.0.4"
clap_complete = "=4.6.9"
clap_complete_nushell = "=4.6.2"
Expand Down Expand Up @@ -124,8 +124,10 @@ default = []

v1_0_0 = [
"bootc",
"recipe-v2"
"recipe-v2",
"next-builder",
]
next-builder = ["dep:blue-build-next-builder", "blue-build-process-management/next-builder"]
bootc = ["blue-build-process-management/bootc"]
vendored-libgit2 = ["dep:git2", "git2/vendored-libgit2"]
recipe-v2 = ["blue-build-recipe/recipe-v2"]
Expand Down
53 changes: 31 additions & 22 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,17 @@ generate-test-secret:
# Run all integration tests
integration-tests: generate-test-secret test-docker-build test-empty-files-build test-arm64-build test-podman-build test-buildah-build test-generate-iso-image test-generate-iso-recipe test-multiplatform

test-next-gen-build: generate-test-secret install-debug-all-features
cd next/tests/repo \
&& {{ cargo_bin }} build \
--retry-push \
{{ should_push }} \
{{ should_not_sign }} \
-vv \
recipes/recipe.yml recipes/recipe-v2.yml

# Run docker driver integration test
test-docker-build: generate-test-secret install-debug-all-features
test-docker-build: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
--retry-push \
Expand All @@ -198,7 +207,7 @@ test-docker-build: generate-test-secret install-debug-all-features
-vv \
recipes/recipe.yml recipes/recipe-gts.yml

test-recipe-v2-build: generate-test-secret install-debug-all-features
test-recipe-v2-build: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
--retry-push \
Expand All @@ -208,7 +217,7 @@ test-recipe-v2-build: generate-test-secret install-debug-all-features
-vv \
recipes/recipe-v2.yml

test-empty-files-build: generate-test-secret install-debug-all-features
test-empty-files-build: generate-test-secret install-debug
cd integration-tests/empty-files-repo \
&& {{ cargo_bin }} build \
--retry-push \
Expand All @@ -218,7 +227,7 @@ test-empty-files-build: generate-test-secret install-debug-all-features
{{ should_not_sign }} \
-vv

test-env-expansion-build: generate-test-secret install-debug-all-features
test-env-expansion-build: generate-test-secret install-debug
cd integration-tests/test-repo \
&& DESC_EXT="Test description" \
VERSION="43" \
Expand All @@ -231,7 +240,7 @@ test-env-expansion-build: generate-test-secret install-debug-all-features
-vv \
recipes/recipe-env-expansion.yml

test-bluefin-build: generate-test-secret install-debug-all-features
test-bluefin-build: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
--retry-push \
Expand All @@ -242,7 +251,7 @@ test-bluefin-build: generate-test-secret install-debug-all-features
-vv \
recipes/recipe-bluefin.yml

test-chunkah-build: generate-test-secret install-debug-all-features
test-chunkah-build: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
{{ should_push }} \
Expand All @@ -251,7 +260,7 @@ test-chunkah-build: generate-test-secret install-debug-all-features
--chunkah \
recipes/recipe-chunkah.yml

test-build-chunked-oci-build: generate-test-secret install-debug-all-features
test-build-chunked-oci-build: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
{{ should_push }} \
Expand All @@ -260,7 +269,7 @@ test-build-chunked-oci-build: generate-test-secret install-debug-all-features
--build-chunked-oci \
recipes/recipe-build-chunked-oci.yml

test-rechunk-build: generate-test-secret install-debug-all-features
test-rechunk-build: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
{{ should_push }} \
Expand All @@ -269,7 +278,7 @@ test-rechunk-build: generate-test-secret install-debug-all-features
--rechunk \
recipes/recipe-rechunk.yml

test-fresh-rechunk-build: generate-test-secret install-debug-all-features
test-fresh-rechunk-build: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
{{ should_push }} \
Expand All @@ -280,7 +289,7 @@ test-fresh-rechunk-build: generate-test-secret install-debug-all-features
recipes/recipe-rechunk.yml

# Run arm integration test
test-arm64-build: generate-test-secret install-debug-all-features
test-arm64-build: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
--retry-push \
Expand All @@ -291,7 +300,7 @@ test-arm64-build: generate-test-secret install-debug-all-features
recipes/recipe-arm64.yml

# Run docker driver external login integration test
test-docker-build-external-login: generate-test-secret install-debug-all-features
test-docker-build-external-login: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
--retry-push \
Expand All @@ -302,7 +311,7 @@ test-docker-build-external-login: generate-test-secret install-debug-all-feature
recipes/recipe-docker-external.yml

# Run podman driver integration test
test-podman-build: generate-test-secret install-debug-all-features
test-podman-build: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
--retry-push \
Expand All @@ -314,7 +323,7 @@ test-podman-build: generate-test-secret install-debug-all-features
recipes/recipe-podman.yml

# Run buildah driver integration test
test-buildah-build: generate-test-secret install-debug-all-features
test-buildah-build: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
--retry-push \
Expand All @@ -328,7 +337,7 @@ test-buildah-build: generate-test-secret install-debug-all-features
# Run the multi-platform builds
test-multiplatform: test-multiplatform-docker test-multiplatform-podman test-multiplatform-buildah test-multiplatform-chunkah test-multiplatform-build-chunked-oci test-multiplatform-rechunk

test-multiplatform-docker: generate-test-secret install-debug-all-features
test-multiplatform-docker: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
--retry-push \
Expand All @@ -339,7 +348,7 @@ test-multiplatform-docker: generate-test-secret install-debug-all-features
-vv \
recipes/recipe-multiplatform-docker.yml

test-multiplatform-podman: generate-test-secret install-debug-all-features
test-multiplatform-podman: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
--retry-push \
Expand All @@ -350,7 +359,7 @@ test-multiplatform-podman: generate-test-secret install-debug-all-features
-vv \
recipes/recipe-multiplatform-podman.yml

test-multiplatform-buildah: generate-test-secret install-debug-all-features
test-multiplatform-buildah: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
--retry-push \
Expand All @@ -361,7 +370,7 @@ test-multiplatform-buildah: generate-test-secret install-debug-all-features
-vv \
recipes/recipe-multiplatform-buildah.yml

test-multiplatform-chunkah: generate-test-secret install-debug-all-features
test-multiplatform-chunkah: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
--retry-push \
Expand All @@ -373,7 +382,7 @@ test-multiplatform-chunkah: generate-test-secret install-debug-all-features
-vv \
recipes/recipe-multiplatform-chunkah.yml

test-multiplatform-build-chunked-oci: generate-test-secret install-debug-all-features
test-multiplatform-build-chunked-oci: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
--retry-push \
Expand All @@ -385,7 +394,7 @@ test-multiplatform-build-chunked-oci: generate-test-secret install-debug-all-fea
-vv \
recipes/recipe-multiplatform-build-chunked-oci.yml

test-multiplatform-rechunk: generate-test-secret install-debug-all-features
test-multiplatform-rechunk: generate-test-secret install-debug
cd integration-tests/test-repo \
&& {{ cargo_bin }} build \
--retry-push \
Expand All @@ -397,21 +406,21 @@ test-multiplatform-rechunk: generate-test-secret install-debug-all-features
recipes/recipe-multiplatform-rechunk.yml

# Run ISO generator for images
test-generate-iso-image: generate-test-secret install-debug-all-features
test-generate-iso-image: generate-test-secret install-debug
#!/usr/bin/env bash
set -eu
ISO_OUT=$(mktemp -d)
{{ cargo_bin }} generate-iso -vv --output-dir "$ISO_OUT" image ghcr.io/{{ project_path }}/test:latest

# Run ISO generator for images using web-ui
test-generate-iso-web-ui: generate-test-secret install-debug-all-features
test-generate-iso-web-ui: generate-test-secret install-debug
#!/usr/bin/env bash
set -eu
ISO_OUT=$(mktemp -d)
{{ cargo_bin }} generate-iso -vv --output-dir "$ISO_OUT" --web-ui image ghcr.io/{{ project_path }}/test:latest

# Run ISO generator for images
test-generate-iso-recipe: generate-test-secret install-debug-all-features
test-generate-iso-recipe: generate-test-secret install-debug
#!/usr/bin/env bash
set -eu
ISO_OUT=$(mktemp -d)
Expand Down
2 changes: 1 addition & 1 deletion next/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//!
#![doc = include_str!("../LGPL_2.1.txt")]

mod build_scripts;
pub mod build_scripts;
pub mod layer;
pub mod path;
pub mod reference;
Expand Down
48 changes: 48 additions & 0 deletions next/tests/repo/recipes/recipe-v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
# yaml-language-server: $schema=https://schema.blue-build.org/recipe.json
base:
image:
registry: ghcr.io
repository: blue-build/base-images
tag: 44
public-key: https://github.com/blue-build/base-images/raw/refs/heads/main/cosign.pub
metadata:
name: cli/test-next-gen
description: Test recipe for the BlueBuild Next Gen Builder
labels:
org.bluebuild.cli.test: "true"
tags:
- v2
spec:
platforms:
- linux/amd64
- linux/arm64
tool-versions:
bluebuild: main
modules:
- type: files
files:
- source: system
destination: /
- type: dnf
repos:
copr:
- atim/starship
install:
packages:
- micro
- starship
remove:
packages:
- firefox
- firefox-langpacks
- type: default-flatpaks
configurations:
- notify: true
scope: system
install:
- org.mozilla.firefox
- org.gnome.Loupe
- scope: user
- type: signing
version: 2
26 changes: 8 additions & 18 deletions next/tests/repo/recipes/recipe.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
---
# yaml-language-server: $schema=https://schema.blue-build.org/recipe-v1.json
# image will be published to ghcr.io/<user>/<name>
name: cli/test-next-gen
# description will be included in the image's metadata
description: Test recipe for the BlueBuild Next Gen Builder

# the base image to build on top of (FROM) and the version tag to use
base-image: ghcr.io/ublue-os/silverblue-main
image-version: latest # You can pin to a specific version of Fedora as well

# module configuration, executed in order
# you can include multiple instances of the same module
base-image: ghcr.io/blue-build/base-images/fedora-kinoite
image-version: latest
modules:
- type: files
files:
- source: system
destination: / # copies files/system/* (* means everything inside it) into your image's root folder /
destination: /

- type: dnf
repos:
Expand All @@ -27,19 +20,16 @@ modules:
- starship
remove:
packages:
# example: removing firefox (in favor of the flatpak)
# "firefox" is the main package, "firefox-langpacks" is a dependency
- firefox
- firefox-langpacks # also remove firefox dependency (not required for all packages, this is a special case)
- firefox-langpacks

- type: default-flatpaks
configurations:
- notify: true # Send notification after install/uninstall is finished (true/false)
- notify: true
scope: system
# If no repo information is specified, Flathub will be used by default
install: # system flatpaks we want all users to have and not remove
install:
- org.mozilla.firefox
- org.gnome.Loupe
- scope: user # Also add Flathub user repo, but no user packages
- scope: user

- type: signing # this sets up the proper policy & signing files for signed images to work fully
- type: signing
1 change: 1 addition & 0 deletions process/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ workspace = true

[features]
bootc = []
next-builder = []
Loading
Loading