Fix patch application and add artifact management
Some checks failed
Build Packages / Build libostree Backport (push) Successful in 9m3s
Test Build / Test bootc Build (with existing libostree) (push) Failing after 53s
Build Packages / Build bootc Package (push) Failing after 1m7s
Build Packages / Create Combined Artifacts (push) Has been skipped
Some checks failed
Build Packages / Build libostree Backport (push) Successful in 9m3s
Test Build / Test bootc Build (with existing libostree) (push) Failing after 53s
Build Packages / Build bootc Package (push) Failing after 1m7s
Build Packages / Create Combined Artifacts (push) Has been skipped
- Add debugging step to show file structure before patching - Add logic to try different patch strip levels (-p1 vs -p0) - Add error handling to show available Rust files if target not found - Add artifact upload steps for both libostree and bootc packages - Create release-assets directory with build summary - Copy all .deb packages to artifacts directory for visibility This fixes the "can't find file to patch" error and ensures built packages are accessible as artifacts in the CI/CD workspace.
This commit is contained in:
parent
b8e6484059
commit
28955d63c9
1 changed files with 57 additions and 3 deletions
|
|
@ -78,6 +78,13 @@ jobs:
|
|||
echo "Built libostree packages:"
|
||||
ls -la /opt/Projects/ostree-backport-noble/*.deb
|
||||
|
||||
- name: Upload libostree artifacts
|
||||
run: |
|
||||
mkdir -p /workspace/robojerk/bootc-deb/artifacts
|
||||
cp /opt/Projects/ostree-backport-noble/*.deb /workspace/robojerk/bootc-deb/artifacts/
|
||||
echo "Libostree artifacts copied to workspace"
|
||||
ls -la /workspace/robojerk/bootc-deb/artifacts/
|
||||
|
||||
build-bootc:
|
||||
name: Build bootc Package
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -114,6 +121,17 @@ jobs:
|
|||
git clone --depth 1 --branch v${BOOTC_VERSION} https://github.com/containers/bootc.git bootc-${BOOTC_VERSION}
|
||||
cd bootc-${BOOTC_VERSION}
|
||||
|
||||
- name: Debug - List files before patching
|
||||
run: |
|
||||
cd bootc-${BOOTC_VERSION}
|
||||
echo "Current directory: $(pwd)"
|
||||
echo "Files in current directory:"
|
||||
ls -la
|
||||
echo "Files in crates/lib/src/ (if it exists):"
|
||||
ls -la crates/lib/src/ 2>/dev/null || echo "Directory does not exist"
|
||||
echo "Patch file location:"
|
||||
ls -la ../bootc-libostree-compatibility.patch
|
||||
|
||||
- name: Apply compatibility patch
|
||||
run: |
|
||||
cd bootc-${BOOTC_VERSION}
|
||||
|
|
@ -122,7 +140,19 @@ jobs:
|
|||
echo "This patch is required for bootc to work with the libostree backport."
|
||||
exit 1
|
||||
fi
|
||||
patch -p1 < ../bootc-libostree-compatibility.patch
|
||||
# Try to find the correct path for the file to patch
|
||||
if [ -f "crates/lib/src/cli.rs" ]; then
|
||||
echo "Found crates/lib/src/cli.rs, applying patch..."
|
||||
patch -p1 < ../bootc-libostree-compatibility.patch
|
||||
elif [ -f "lib/src/cli.rs" ]; then
|
||||
echo "Found lib/src/cli.rs, applying patch with -p0..."
|
||||
patch -p0 < ../bootc-libostree-compatibility.patch
|
||||
else
|
||||
echo "❌ ERROR: Could not find cli.rs file to patch!"
|
||||
echo "Available files:"
|
||||
find . -name "*.rs" | head -20
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Copy debian packaging
|
||||
run: |
|
||||
|
|
@ -145,6 +175,13 @@ jobs:
|
|||
echo "Built bootc packages:"
|
||||
ls -la bootc-${BOOTC_VERSION}/../*.deb
|
||||
|
||||
- name: Upload bootc artifacts
|
||||
run: |
|
||||
mkdir -p /workspace/robojerk/bootc-deb/artifacts
|
||||
cp bootc-${BOOTC_VERSION}/../*.deb /workspace/robojerk/bootc-deb/artifacts/
|
||||
echo "Bootc artifacts copied to workspace"
|
||||
ls -la /workspace/robojerk/bootc-deb/artifacts/
|
||||
|
||||
create-artifacts:
|
||||
name: Create Combined Artifacts
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -176,5 +213,22 @@ jobs:
|
|||
run: |
|
||||
mkdir -p release-assets
|
||||
echo "Creating release assets directory"
|
||||
echo "Note: In a real setup, this would combine artifacts from previous jobs"
|
||||
echo "For now, this is a placeholder for the artifact creation process"
|
||||
|
||||
# Copy all artifacts from previous jobs
|
||||
if [ -d "artifacts" ]; then
|
||||
cp artifacts/*.deb release-assets/ 2>/dev/null || echo "No .deb files found in artifacts"
|
||||
fi
|
||||
|
||||
# Create a summary file
|
||||
echo "Bootc Debian Package Build Summary" > release-assets/BUILD_SUMMARY.txt
|
||||
echo "=================================" >> release-assets/BUILD_SUMMARY.txt
|
||||
echo "Build Date: $(date)" >> release-assets/BUILD_SUMMARY.txt
|
||||
echo "Ubuntu Version: ${UBUNTU_VERSION}" >> release-assets/BUILD_SUMMARY.txt
|
||||
echo "Ostree Version: ${OSTREE_VERSION}" >> release-assets/BUILD_SUMMARY.txt
|
||||
echo "Bootc Version: ${BOOTC_VERSION}" >> release-assets/BUILD_SUMMARY.txt
|
||||
echo "" >> release-assets/BUILD_SUMMARY.txt
|
||||
echo "Built Packages:" >> release-assets/BUILD_SUMMARY.txt
|
||||
ls -la release-assets/*.deb 2>/dev/null || echo "No packages found" >> release-assets/BUILD_SUMMARY.txt
|
||||
|
||||
echo "Release assets created:"
|
||||
ls -la release-assets/
|
||||
Loading…
Add table
Add a link
Reference in a new issue