Fix CI workflow for bootc-image-builder project
Some checks failed
Comprehensive CI/CD Pipeline / Build and Test (push) Failing after 8s
Comprehensive CI/CD Pipeline / Security Audit (push) Failing after 7s
Comprehensive CI/CD Pipeline / Package Validation (push) Failing after 49s
Comprehensive CI/CD Pipeline / Status Report (push) Has been skipped
Test Workflow / test (push) Successful in 2s

- Update dependencies to match bootc-image-builder requirements
- Fix package name references from apt-ostree-builder to bootc-image-builder
- Update package description and dependencies
- Fix CI summary and artifact references
This commit is contained in:
robojerk 2025-09-09 20:03:26 -07:00
parent 15ed3c048a
commit 5940322bba

View file

@ -70,26 +70,26 @@ jobs:
apt update -y
apt install -y --no-install-recommends \
git curl pkg-config build-essential gnupg wget \
libapt-pkg-dev libapt-pkg7.0 libostree-dev \
libssl-dev libdbus-1-dev libglib2.0-dev \
libpolkit-gobject-1-dev libzstd-dev devscripts debhelper dh-cargo \
libcurl4-gnutls-dev libsystemd-dev libmount-dev \
libselinux1-dev libsepol-dev libarchive-dev \
libgpgme-dev libavahi-client-dev libavahi-common-dev \
libffi-dev libpcre2-dev libxml2-dev zlib1g-dev \
liblz4-dev liblzma-dev nettle-dev libgmp-dev \
libicu-dev libpython3-dev python3-dev \
python3-setuptools python3-wheel python3-pip \
crossbuild-essential-amd64 crossbuild-essential-arm64 \
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
libssl-dev libostree-dev libostree-1-1 ostree \
podman qemu-utils parted grub-efi-amd64 systemd-boot \
dracut composefs zstd cpio tar ca-certificates \
devscripts debhelper dh-cargo libcurl4-gnutls-dev \
libsystemd-dev libmount-dev libselinux1-dev libsepol-dev \
libarchive-dev libgpgme-dev libavahi-client-dev \
libavahi-common-dev libffi-dev libpcre2-dev libxml2-dev \
zlib1g-dev liblz4-dev liblzma-dev nettle-dev libgmp-dev \
libicu-dev libpython3-dev python3-dev python3-setuptools \
python3-wheel python3-pip crossbuild-essential-amd64 \
crossbuild-essential-arm64 gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu gcc-arm-linux-gnueabihf \
g++-arm-linux-gnueabihf
- name: Checkout code
run: |
# Clone the repository manually
git clone https://git.raines.xyz/particle-os/apt-ostree-builder.git /tmp/apt-ostree-builder
cp -r /tmp/apt-ostree-builder/* .
cp -r /tmp/apt-ostree-builder/.* . 2>/dev/null || true
git clone https://git.raines.xyz/particle-os/bootc-image-builder.git /tmp/bootc-image-builder
cp -r /tmp/bootc-image-builder/* .
cp -r /tmp/bootc-image-builder/.* . 2>/dev/null || true
- name: Verify Rust toolchain
run: |
@ -199,7 +199,7 @@ jobs:
echo "✅ Using enhanced debian/rules for build"
# Update debian/changelog with build version
echo "apt-ostree-builder ($BUILD_VERSION) unstable; urgency=medium" > debian/changelog
echo "bootc-image-builder ($BUILD_VERSION) unstable; urgency=medium" > debian/changelog
echo "" >> debian/changelog
echo " * CI Build #$BUILD_NUMBER from commit $COMMIT_HASH" >> debian/changelog
echo " * Automated build with enhanced Debian packaging" >> debian/changelog
@ -215,22 +215,38 @@ jobs:
else
# Fallback: create a simple package (should not happen with enhanced packaging)
echo "⚠️ No debian/rules found, creating simple package..."
mkdir -p debian/apt-ostree-builder/usr/bin
cp target/release/apt-ostree-builder debian/apt-ostree-builder/usr/bin/
chmod +x debian/apt-ostree-builder/usr/bin/apt-ostree-builder
mkdir -p debian/bootc-image-builder/usr/bin
cp target/release/bootc-image-builder debian/bootc-image-builder/usr/bin/
chmod +x debian/bootc-image-builder/usr/bin/bootc-image-builder
# Create control file with build version
mkdir -p debian/apt-ostree-builder/DEBIAN
echo "Package: apt-ostree-builder" > debian/apt-ostree-builder/DEBIAN/control
echo "Version: $BUILD_VERSION" >> debian/apt-ostree-builder/DEBIAN/control
echo "Architecture: amd64" >> debian/apt-ostree-builder/DEBIAN/control
echo "Maintainer: Robojerk <robojerk@example.com>" >> debian/apt-ostree-builder/DEBIAN/control
echo "Description: APT-OSTree package for Debian-based OSTree systems" >> debian/apt-ostree-builder/DEBIAN/control
echo " A tool for managing OSTree deployments with APT package management." >> debian/apt-ostree-builder/DEBIAN/control
echo " Provides atomic updates and rollback capabilities for Debian systems." >> debian/apt-ostree-builder/DEBIAN/control
mkdir -p debian/bootc-image-builder/DEBIAN
echo "Package: bootc-image-builder" > debian/bootc-image-builder/DEBIAN/control
echo "Version: $BUILD_VERSION" >> debian/bootc-image-builder/DEBIAN/control
echo "Architecture: amd64" >> debian/bootc-image-builder/DEBIAN/control
echo "Maintainer: CI Build <ci@particle-os.org>" >> debian/bootc-image-builder/DEBIAN/control
echo "Depends: libc6 (>= 2.39), libgcc-s1 (>= 3.0), libssl3t64 (>= 3.0.0)," >> debian/bootc-image-builder/DEBIAN/control
echo " libostree-1-1 (>= 2023.1), ostree (>= 2023.1), podman (>= 4.0)," >> debian/bootc-image-builder/DEBIAN/control
echo " qemu-utils (>= 7.0), parted (>= 3.0)," >> debian/bootc-image-builder/DEBIAN/control
echo " grub-efi-amd64 (>= 2.0) | systemd-boot (>= 250)," >> debian/bootc-image-builder/DEBIAN/control
echo " dracut (>= 055), composefs (>= 0.1)," >> debian/bootc-image-builder/DEBIAN/control
echo " zstd (>= 1.0), cpio (>= 2.0), tar (>= 1.0)" >> debian/bootc-image-builder/DEBIAN/control
echo "Description: Bootc container image to disk image converter" >> debian/bootc-image-builder/DEBIAN/control
echo " Bootc-image-builder converts bootc container images into bootable disk images." >> debian/bootc-image-builder/DEBIAN/control
echo " ." >> debian/bootc-image-builder/DEBIAN/control
echo " Features:" >> debian/bootc-image-builder/DEBIAN/control
echo " - Multi-format support (QCOW2, Raw, VMDK, ISO, AMI)" >> debian/bootc-image-builder/DEBIAN/control
echo " - Bootc container image support" >> debian/bootc-image-builder/DEBIAN/control
echo " - OSTree repository integration" >> debian/bootc-image-builder/DEBIAN/control
echo " - Composefs support" >> debian/bootc-image-builder/DEBIAN/control
echo " - Initramfs creation with dracut" >> debian/bootc-image-builder/DEBIAN/control
echo " - GRUB and systemd-boot support" >> debian/bootc-image-builder/DEBIAN/control
echo " - UEFI and BIOS boot modes" >> debian/bootc-image-builder/DEBIAN/control
echo " - Secure boot support" >> debian/bootc-image-builder/DEBIAN/control
echo " - Cloud integration (AWS, Azure, GCP)" >> debian/bootc-image-builder/DEBIAN/control
# Build package with build version
dpkg-deb --build debian/apt-ostree-builder "apt-ostree-builder_${BUILD_VERSION}_amd64.deb"
dpkg-deb --build debian/bootc-image-builder "bootc-image-builder_${BUILD_VERSION}_amd64.deb"
fi
# Check if package was created (dpkg-buildpackage puts them in parent directory)
@ -244,10 +260,10 @@ jobs:
pkg_name=$(basename "$pkg")
# Extract current version and replace with build version using sed
if echo "$pkg_name" | grep -q "^apt-ostree-builder_.*_.*\.deb$"; then
if echo "$pkg_name" | grep -q "^bootc-image-builder_.*_.*\.deb$"; then
# Extract architecture (last part before .deb)
arch=$(echo "$pkg_name" | sed 's/.*_\([^.]*\)\.deb$/\1/')
new_name="apt-ostree-builder_${BUILD_VERSION}_${arch}.deb"
new_name="bootc-image-builder_${BUILD_VERSION}_${arch}.deb"
echo "Renaming: $pkg_name -> $new_name"
cp "$pkg" "$new_name"
else
@ -292,13 +308,13 @@ jobs:
dpkg -i "$DEB_PACKAGE" || echo "Installation test failed (this is normal for CI)"
# Check if binary is accessible
if which apt-ostree-builder >/dev/null 2>&1; then
echo "✅ apt-ostree-builder installed successfully"
apt-ostree-builder --version || echo "Version check failed"
if which bootc-image-builder >/dev/null 2>&1; then
echo "✅ bootc-image-builder installed successfully"
bootc-image-builder --version || echo "Version check failed"
else
echo "❌ apt-ostree-builder not found in PATH"
echo "❌ bootc-image-builder not found in PATH"
echo "Checking installation location:"
find /usr -name "apt-ostree-builder" 2>/dev/null || echo "Not found in /usr"
find /usr -name "bootc-image-builder" 2>/dev/null || echo "Not found in /usr"
fi
else
echo "❌ No main package found to test"
@ -309,7 +325,7 @@ jobs:
echo "Creating build summary..."
# Create a summary markdown file
echo '# APT-OSTree CI Summary' > CI_SUMMARY.md
echo '# Bootc-Image-Builder CI Summary' > CI_SUMMARY.md
echo '' >> CI_SUMMARY.md
echo '## Build Information' >> CI_SUMMARY.md
echo '- **Build Date**: '"$(date '+%Y-%m-%d %H:%M:%S UTC')" >> CI_SUMMARY.md
@ -341,10 +357,12 @@ jobs:
# Add dependency information
echo '' >> CI_SUMMARY.md
echo '### Dependencies' >> CI_SUMMARY.md
echo '- libapt-pkg-dev ✅' >> CI_SUMMARY.md
echo '- libostree-dev ✅' >> CI_SUMMARY.md
echo '- libssl-dev ✅' >> CI_SUMMARY.md
echo '- libdbus-1-dev ✅' >> CI_SUMMARY.md
echo '- libglib2.0-dev ✅' >> CI_SUMMARY.md
echo '- podman ✅' >> CI_SUMMARY.md
echo '- qemu-utils ✅' >> CI_SUMMARY.md
echo '- dracut ✅' >> CI_SUMMARY.md
echo '- composefs ✅' >> CI_SUMMARY.md
echo '- All build dependencies satisfied ✅' >> CI_SUMMARY.md
echo "CI summary created: CI_SUMMARY.md"
@ -411,7 +429,7 @@ jobs:
# Copy Rust build artifacts (optional)
if [ -d "target/release" ]; then
mkdir -p artifacts/rust-build
cp target/release/apt-ostree-builder artifacts/rust-build/ 2>/dev/null || echo "Binary copy failed (normal for CI)"
cp target/release/bootc-image-builder artifacts/rust-build/ 2>/dev/null || echo "Binary copy failed (normal for CI)"
fi
# Create artifacts manifest
@ -447,8 +465,8 @@ jobs:
# Create a compressed archive for easy download
echo "Creating downloadable archive..."
tar -czf apt-ostree-builder-build-$(date +%Y%m%d-%H%M%S).tar.gz artifacts/
echo "Archive created: apt-ostree-builder-build-$(date +%Y%m%d-%H%M%S).tar.gz"
tar -czf bootc-image-builder-build-$(date +%Y%m%d-%H%M%S).tar.gz artifacts/
echo "Archive created: bootc-image-builder-build-$(date +%Y%m%d-%H%M%S).tar.gz"
# List all available downloads
echo ""
@ -483,7 +501,7 @@ jobs:
echo "" >> ARTIFACTS_README.md
echo "- **Debian Packages** (.deb files) - Ready to install" >> ARTIFACTS_README.md
echo "- **Build Summary** - Complete CI results and status" >> ARTIFACTS_README.md
echo "- **Rust Binary** - Compiled apt-ostree-builder executable" >> ARTIFACTS_README.md
echo "- **Rust Binary** - Compiled bootc-image-builder executable" >> ARTIFACTS_README.md
echo "- **Artifacts Manifest** - Detailed contents listing" >> ARTIFACTS_README.md
echo "" >> ARTIFACTS_README.md
echo "## 🚀 How to Download" >> ARTIFACTS_README.md
@ -539,7 +557,7 @@ jobs:
echo "📦 Publishing $deb_file..."
# Extract package info
PKG_NAME=$(dpkg-deb -f "$deb_file" Package 2>/dev/null || echo "apt-ostree-builder")
PKG_NAME=$(dpkg-deb -f "$deb_file" Package 2>/dev/null || echo "bootc-image-builder")
PKG_VERSION=$(dpkg-deb -f "$deb_file" Version 2>/dev/null || echo "unknown")
PKG_ARCH=$(dpkg-deb -f "$deb_file" Architecture 2>/dev/null || echo "amd64")
@ -596,7 +614,7 @@ jobs:
echo "🎯 Debian package publishing complete!"
echo "📦 Packages are now available in Forgejo Debian Registry"
echo "🔧 To install: apt install apt-ostree-builder"
echo "🔧 To install: apt install bootc-image-builder"
# Security check
security:
@ -632,9 +650,9 @@ jobs:
- name: Checkout code
run: |
git clone https://git.raines.xyz/particle-os/apt-ostree-builder.git /tmp/apt-ostree-builder
cp -r /tmp/apt-ostree-builder/* .
cp -r /tmp/apt-ostree-builder/.* . 2>/dev/null || true
git clone https://git.raines.xyz/particle-os/bootc-image-builder.git /tmp/bootc-image-builder
cp -r /tmp/bootc-image-builder/* .
cp -r /tmp/bootc-image-builder/.* . 2>/dev/null || true
- name: Run security audit
run: |
@ -680,9 +698,9 @@ jobs:
- name: Checkout code
run: |
git clone https://git.raines.xyz/particle-os/apt-ostree-builder.git /tmp/apt-ostree-builder
cp -r /tmp/apt-ostree-builder/* .
cp -r /tmp/apt-ostree-builder/.* . 2>/dev/null || true
git clone https://git.raines.xyz/particle-os/bootc-image-builder.git /tmp/bootc-image-builder
cp -r /tmp/bootc-image-builder/* .
cp -r /tmp/bootc-image-builder/.* . 2>/dev/null || true
- name: Validate package structure
run: |
@ -700,14 +718,14 @@ jobs:
[ -f "debian/compat" ] && echo "✅ debian/compat found" || echo "❌ debian/compat missing"
# Check enhanced packaging files
[ -f "debian/apt-ostree-builder.1" ] && echo "✅ debian/apt-ostree-builder.1 (man page) found" || echo "❌ debian/apt-ostree-builder.1 missing"
[ -f "debian/apt-ostree-builder.bash-completion" ] && echo "✅ bash completion found" || echo "❌ bash completion missing"
[ -f "debian/apt-ostree-builder.zsh-completion" ] && echo "✅ zsh completion found" || echo "❌ zsh completion missing"
[ -f "debian/apt-ostree-builder.postinst" ] && echo "✅ postinst script found" || echo "❌ postinst script missing"
[ -f "debian/apt-ostree-builder.prerm" ] && echo "✅ prerm script found" || echo "❌ prerm script missing"
[ -f "debian/apt-ostree-builder.postrm" ] && echo "✅ postrm script found" || echo "❌ postrm script missing"
[ -f "debian/apt-ostree-builder.triggers" ] && echo "✅ triggers file found" || echo "❌ triggers file missing"
[ -f "debian/apt-ostree-builder.lintian-overrides" ] && echo "✅ lintian overrides found" || echo "❌ lintian overrides missing"
[ -f "debian/bootc-image-builder.1" ] && echo "✅ debian/bootc-image-builder.1 (man page) found" || echo "❌ debian/bootc-image-builder.1 missing"
[ -f "debian/bootc-image-builder.bash-completion" ] && echo "✅ bash completion found" || echo "❌ bash completion missing"
[ -f "debian/bootc-image-builder.zsh-completion" ] && echo "✅ zsh completion found" || echo "❌ zsh completion missing"
[ -f "debian/bootc-image-builder.postinst" ] && echo "✅ postinst script found" || echo "❌ postinst script missing"
[ -f "debian/bootc-image-builder.prerm" ] && echo "✅ prerm script found" || echo "❌ prerm script missing"
[ -f "debian/bootc-image-builder.postrm" ] && echo "✅ postrm script found" || echo "❌ postrm script missing"
[ -f "debian/bootc-image-builder.triggers" ] && echo "✅ triggers file found" || echo "❌ triggers file missing"
[ -f "debian/bootc-image-builder.lintian-overrides" ] && echo "✅ lintian overrides found" || echo "❌ lintian overrides missing"
# Check source package configuration
[ -d "debian/source" ] && echo "✅ debian/source directory found" || echo "❌ debian/source directory missing"
@ -820,9 +838,9 @@ jobs:
- name: Checkout code
run: |
git clone https://git.raines.xyz/particle-os/apt-ostree-builder.git /tmp/apt-ostree-builder
cp -r /tmp/apt-ostree-builder/* .
cp -r /tmp/apt-ostree-builder/.* . 2>/dev/null || true
git clone https://git.raines.xyz/particle-os/bootc-image-builder.git /tmp/bootc-image-builder
cp -r /tmp/bootc-image-builder/* .
cp -r /tmp/bootc-image-builder/.* . 2>/dev/null || true
- name: Create status report
run: |