🔧 Fix YAML syntax error - Replace problematic heredoc

-  Fix syntax error on line 117 (could not find expected ':')
- 🔄 Replace EOF heredoc with individual echo commands
-  YAML now passes syntax validation
- 📝 Line length warnings remain (non-critical formatting)
- 🎯 Target: Resolve YAML syntax issues that could cause CI failures
This commit is contained in:
joe 2025-08-13 19:59:17 -07:00
parent 079e67e9ac
commit 0cd7ca2703

View file

@ -1,10 +1,11 @@
---
name: Comprehensive CI/CD Pipeline name: Comprehensive CI/CD Pipeline
on: on:
push: push:
branches: [ main, develop ] branches: [main, develop]
pull_request: pull_request:
branches: [ main ] branches: [main]
workflow_dispatch: workflow_dispatch:
env: env:
@ -27,7 +28,7 @@ jobs:
echo 'Acquire::GzipIndexes "true";' >> /etc/apt/apt.conf.d/99translations echo 'Acquire::GzipIndexes "true";' >> /etc/apt/apt.conf.d/99translations
echo 'Acquire::CompressionTypes::Order:: "gz";' >> /etc/apt/apt.conf.d/99translations echo 'Acquire::CompressionTypes::Order:: "gz";' >> /etc/apt/apt.conf.d/99translations
echo 'Dpkg::Use-Pty "0";' >> /etc/apt/apt.conf.d/99translations echo 'Dpkg::Use-Pty "0";' >> /etc/apt/apt.conf.d/99translations
# Update package lists # Update package lists
apt update -y apt update -y
@ -39,7 +40,7 @@ jobs:
echo "deb-src http://192.168.1.101:3142/ftp.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/apt-cacher-ng.list echo "deb-src http://192.168.1.101:3142/ftp.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/apt-cacher-ng.list
apt update -y apt update -y
else else
echo "⚠️ apt-cacher-ng not available, using standard Debian sources..." echo "⚠️ apt-cacher-ng not available, using standard Debian sources..."
echo "deb http://deb.debian.org/debian trixie main contrib non-free" > /etc/apt/sources.list.d/standard.list echo "deb http://deb.debian.org/debian trixie main contrib non-free" > /etc/apt/sources.list.d/standard.list
echo "deb-src http://deb.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/standard.list echo "deb-src http://deb.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/standard.list
apt update -y apt update -y
@ -85,11 +86,11 @@ jobs:
- name: Build Debian package - name: Build Debian package
run: | run: |
echo "Building Debian package..." echo "Building Debian package..."
# Check if we have the necessary files # Check if we have the necessary files
if [ -f "Cargo.toml" ] && [ -d "debian" ]; then if [ -f "Cargo.toml" ] && [ -d "debian" ]; then
echo "✅ Found Cargo.toml and debian directory" echo "✅ Found Cargo.toml and debian directory"
# Build Debian package # Build Debian package
if [ -f "debian/rules" ]; then if [ -f "debian/rules" ]; then
# Use debian/rules if it exists # Use debian/rules if it exists
@ -100,23 +101,21 @@ jobs:
mkdir -p debian/apt-ostree/usr/bin mkdir -p debian/apt-ostree/usr/bin
cp target/release/apt-ostree debian/apt-ostree/usr/bin/ cp target/release/apt-ostree debian/apt-ostree/usr/bin/
chmod +x debian/apt-ostree/usr/bin/apt-ostree chmod +x debian/apt-ostree/usr/bin/apt-ostree
# Create control file # Create control file
mkdir -p debian/apt-ostree/DEBIAN mkdir -p debian/apt-ostree/DEBIAN
cat > debian/apt-ostree/DEBIAN/control << 'EOF' echo "Package: apt-ostree" > debian/apt-ostree/DEBIAN/control
Package: apt-ostree echo "Version: 0.1.0" >> debian/apt-ostree/DEBIAN/control
Version: 0.1.0 echo "Architecture: amd64" >> debian/apt-ostree/DEBIAN/control
Architecture: amd64 echo "Maintainer: Robojerk <robojerk@example.com>" >> debian/apt-ostree/DEBIAN/control
Maintainer: Robojerk <robojerk@example.com> echo "Description: APT-OSTree package for Debian-based OSTree systems" >> debian/apt-ostree/DEBIAN/control
Description: APT-OSTree package for Debian-based OSTree systems echo " A tool for managing OSTree deployments with APT package management." >> debian/apt-ostree/DEBIAN/control
A tool for managing OSTree deployments with APT package management. echo " Provides atomic updates and rollback capabilities for Debian systems." >> debian/apt-ostree/DEBIAN/control
Provides atomic updates and rollback capabilities for Debian systems.
EOF
# Build package # Build package
dpkg-deb --build debian/apt-ostree apt-ostree_0.1.0_amd64.deb dpkg-deb --build debian/apt-ostree apt-ostree_0.1.0_amd64.deb
fi fi
# Check if package was created # Check if package was created
if ls *.deb >/dev/null 2>&1; then if ls *.deb >/dev/null 2>&1; then
echo "✅ Debian package created successfully" echo "✅ Debian package created successfully"
@ -135,17 +134,17 @@ EOF
- name: Test built package - name: Test built package
run: | run: |
echo "Testing built package..." echo "Testing built package..."
# Find the package # Find the package
DEB_PACKAGE=$(ls *.deb 2>/dev/null | head -1) DEB_PACKAGE=$(ls *.deb 2>/dev/null | head -1)
if [ -n "$DEB_PACKAGE" ]; then if [ -n "$DEB_PACKAGE" ]; then
echo "✅ Found package: $DEB_PACKAGE" echo "✅ Found package: $DEB_PACKAGE"
# Test package installation # Test package installation
echo "Testing package installation..." echo "Testing package installation..."
dpkg -i "$DEB_PACKAGE" || echo "Installation test failed (this is normal for CI)" dpkg -i "$DEB_PACKAGE" || echo "Installation test failed (this is normal for CI)"
# Check if binary is accessible # Check if binary is accessible
if which apt-ostree >/dev/null 2>&1; then if which apt-ostree >/dev/null 2>&1; then
echo "✅ apt-ostree installed successfully" echo "✅ apt-ostree installed successfully"
@ -216,7 +215,7 @@ EOF
- name: Setup environment - name: Setup environment
run: | run: |
apt update -y apt update -y
# Check if apt-cacher-ng is available # Check if apt-cacher-ng is available
if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then
echo "✅ apt-cacher-ng is available, configuring proxy sources..." echo "✅ apt-cacher-ng is available, configuring proxy sources..."
@ -224,7 +223,7 @@ EOF
echo "deb-src http://192.168.1.101:3142/ftp.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/apt-cacher-ng.list echo "deb-src http://192.168.1.101:3142/ftp.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/apt-cacher-ng.list
apt update -y apt update -y
else else
echo "⚠️ apt-cacher-ng not available, using standard Debian sources..." echo "⚠️ apt-cacher-ng not available, using standard Debian sources..."
echo "deb http://deb.debian.org/debian trixie main contrib non-free" > /etc/apt/sources.list.d/standard.list echo "deb http://deb.debian.org/debian trixie main contrib non-free" > /etc/apt/sources.list.d/standard.list
echo "deb-src http://deb.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/standard.list echo "deb-src http://deb.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/standard.list
apt update -y apt update -y
@ -260,7 +259,7 @@ EOF
- name: Setup environment - name: Setup environment
run: | run: |
apt update -y apt update -y
# Check if apt-cacher-ng is available # Check if apt-cacher-ng is available
if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then
echo "✅ apt-cacher-ng is available, configuring proxy sources..." echo "✅ apt-cacher-ng is available, configuring proxy sources..."
@ -268,7 +267,7 @@ EOF
echo "deb-src http://192.168.1.101:3142/ftp.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/apt-cacher-ng.list echo "deb-src http://192.168.1.101:3142/ftp.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/apt-cacher-ng.list
apt update -y apt update -y
else else
echo "⚠️ apt-cacher-ng not available, using standard Debian sources..." echo "⚠️ apt-cacher-ng not available, using standard Debian sources..."
echo "deb http://deb.debian.org/debian trixie main contrib non-free" > /etc/apt/sources.list.d/standard.list echo "deb http://deb.debian.org/debian trixie main contrib non-free" > /etc/apt/sources.list.d/standard.list
echo "deb-src http://deb.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/standard.list echo "deb-src http://deb.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/standard.list
apt update -y apt update -y
@ -288,19 +287,19 @@ EOF
- name: Validate package structure - name: Validate package structure
run: | run: |
echo "Validating package structure..." echo "Validating package structure..."
# Check for required files # Check for required files
[ -f "Cargo.toml" ] && echo "✅ Cargo.toml found" || echo "❌ Cargo.toml missing" [ -f "Cargo.toml" ] && echo "✅ Cargo.toml found" || echo "❌ Cargo.toml missing"
[ -d "debian" ] && echo "✅ debian/ directory found" || echo "❌ debian/ directory missing" [ -d "debian" ] && echo "✅ debian/ directory found" || echo "❌ debian/ directory missing"
if [ -d "debian" ]; then if [ -d "debian" ]; then
[ -f "debian/control" ] && echo "✅ debian/control found" || echo "❌ debian/control missing" [ -f "debian/control" ] && echo "✅ debian/control found" || echo "❌ debian/control missing"
[ -f "debian/rules" ] && echo "✅ debian/rules found" || echo "❌ debian/rules missing" [ -f "debian/rules" ] && echo "✅ debian/rules found" || echo "❌ debian/rules missing"
fi fi
# Check Rust project # Check Rust project
[ -d "src" ] && echo "✅ src/ directory found" || echo "❌ src/ directory missing" [ -d "src" ] && echo "✅ src/ directory found" || echo "❌ src/ directory missing"
echo "Package validation completed!" echo "Package validation completed!"
- name: Create package summary - name: Create package summary
@ -339,7 +338,7 @@ EOF
echo "- **Container**: rust:slim-trixie" >> STATUS_REPORT.md echo "- **Container**: rust:slim-trixie" >> STATUS_REPORT.md
echo "" >> STATUS_REPORT.md echo "" >> STATUS_REPORT.md
echo "All CI jobs completed successfully! 🎉" >> STATUS_REPORT.md echo "All CI jobs completed successfully! 🎉" >> STATUS_REPORT.md
echo "Status report created: STATUS_REPORT.md" echo "Status report created: STATUS_REPORT.md"
echo "✅ All CI jobs completed successfully!" echo "✅ All CI jobs completed successfully!"