fix: resolve systemd path issues in CI/CD workflows
SYSTEMD PATH FIX: Correct repository path for systemd sync in CI environments Issue Fixed: ❌ Repository systemd directory not found: /opt/aitbc/systemd ❌ CI workflows looking for wrong repository path ❌ Systemd sync failing in CI environments Root Cause: - CI workflows clone repository to workspace directories - Systemd sync script hardcoded to /opt/aitbc/systemd - Repository actually in /opt/aitbc/*-workspace/repo/systemd - Path mismatch causing sync failures Solution Applied: ✅ Dynamic path updates in all workflows ✅ sed commands to update REPO_SYSTEMD_DIR at runtime ✅ Correct paths for each workflow workspace ✅ Fallback manual sync with correct paths Fixed Workflows: 1. systemd-sync.yml: - Updated to use /opt/aitbc/systemd-sync-workspace/repo/systemd - Dynamic path update before running script 2. integration-tests.yml: - Updated to use /opt/aitbc/integration-tests-workspace/repo/systemd - Dynamic path update before running script 3. api-endpoint-tests.yml: - Updated to use /opt/aitbc/api-tests-workspace/repo/systemd - Dynamic path update before running script Changes Made: - Added sed commands to update REPO_SYSTEMD_DIR - Each workflow uses its own workspace path - Maintains original script functionality - Preserves fallback manual sync Impact: - Systemd sync now works in CI environments - Service-dependent workflows can start services - Integration and API tests can run properly - No more path-related failures This resolves the critical path issue that was preventing systemd sync and service-dependent workflows from working in the CI/CD environment.
This commit is contained in:
@@ -56,6 +56,8 @@ jobs:
|
||||
# Ensure systemd files are synced
|
||||
if [[ -f "scripts/link-systemd.sh" ]]; then
|
||||
echo "🔗 Syncing systemd files..."
|
||||
# Update script with correct repository path
|
||||
sed -i "s|REPO_SYSTEMD_DIR=\"/opt/aitbc/systemd\"|REPO_SYSTEMD_DIR=\"/opt/aitbc/integration-tests-workspace/repo/systemd\"|g" scripts/link-systemd.sh
|
||||
sudo ./scripts/link-systemd.sh
|
||||
else
|
||||
echo "⚠️ Systemd sync script not found"
|
||||
|
||||
Reference in New Issue
Block a user