Private
Public Access
1
0

fix: Alpine build - truncated YAML and wrong abuild output path
All checks were successful
CI/CD Pipeline / Code Format (push) Successful in 1s
CI/CD Pipeline / Clippy Lints (push) Successful in 48s
CI/CD Pipeline / All Unit Tests (push) Successful in 1m22s
CI/CD Pipeline / Security Audit (push) Successful in 5s
CI/CD Pipeline / Enrollment Tests (push) Successful in 1m54s
CI/CD Pipeline / Verify Enrollment CLI Flag (push) Successful in 1m31s
CI/CD Pipeline / Build RPM Package (push) Successful in 2m36s
CI/CD Pipeline / Build Debian Package (Ubuntu 22.04) (push) Successful in 2m44s
CI/CD Pipeline / Build Arch Package (push) Successful in 2m54s
CI/CD Pipeline / Build Alpine Package (push) Successful in 3m43s
CI/CD Pipeline / Build Debian Package (push) Successful in 2m5s

Root causes of ALL Alpine build failures:
1. ci.yml: Verify Alpine package step was TRUNCATED at line 339 -
   missing closing quote, then clause, fi, and entire upload step.
   This caused YAML parse failure every run.
2. build-alpine.sh: Copy path was /home/builduser/packages/home/x86_64/
   but abuild outputs to /home/builduser/packages/builduser/x86_64/.
   The find fallback caught stale packages from previous builds.

Fixes:
- Complete the Verify Alpine package step with proper if/fi
- Add Upload to Gitea Release step for Alpine (was completely missing)
- Fix abuild output path in build-alpine.sh
This commit is contained in:
2026-05-27 22:01:19 -05:00
parent 8e0e17855d
commit b3e54f9057
2 changed files with 20 additions and 2 deletions

View File

@ -336,7 +336,24 @@ jobs:
echo "Expected version: $EXPECTED_VERSION"
echo "Package file: $FILE"
# Verify filename contains expected version
if ! echo "$FILE" | grep -q "$EXPECTED_VERSION
if ! echo "$FILE" | grep -q "$EXPECTED_VERSION"; then
echo "ERROR: Alpine package version ($FILE) does not match expected version ($EXPECTED_VERSION)!"
exit 1
fi
echo "Alpine package verification passed"
- name: Upload to Gitea Release
if: startsWith(github.ref, 'refs/tags/')
env:
GITEA_TOKEN: ${{ secrets.GITEATOKEN }}
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
FILE=$(ls releases/linux-patch-api-*.apk 2>/dev/null | head -1)
if [ -z "$FILE" ]; then
echo "ERROR: No Alpine package found for upload!"
exit 1
fi
chmod +x scripts/upload-release.sh
./scripts/upload-release.sh "$TAG_NAME" "$FILE"
build-arch:
name: Build Arch Package

View File

@ -147,8 +147,9 @@ if [ "$(id -u)" = "0" ]; then
su - builduser -c "cd $WORKSPACE_DIR && abuild checksum && abuild -d"
# Copy APK from builduser packages to releases
# Note: abuild outputs to /home/builduser/packages/builduser/x86_64/ not /home/builduser/packages/home/x86_64/
mkdir -p releases
cp /home/builduser/packages/home/x86_64/*.apk releases/ 2>/dev/null || find /home/builduser/packages -name "*.apk" -exec cp {} releases/ \; 2>/dev/null || true
cp /home/builduser/packages/builduser/x86_64/*.apk releases/ 2>/dev/null || find /home/builduser/packages -name "*.apk" -exec cp {} releases/ \; 2>/dev/null || true
else
cd "$WORKSPACE_DIR"
abuild checksum