feat(ci): try again to get dufs working in ci...
This commit is contained in:
parent
ff2a3c93df
commit
c09fea4deb
|
|
@ -203,13 +203,21 @@ jobs:
|
||||||
|
|
||||||
# Wait for server to start
|
# Wait for server to start
|
||||||
for i in {1..30}; do
|
for i in {1..30}; do
|
||||||
if curl -f "http://testuser:testpass123@localhost:8080/" > /dev/null 2>&1; then
|
# Test with basic auth header instead of URL auth
|
||||||
echo "WebDAV server is ready"
|
response=$(curl -s -o /dev/null -w "%{http_code}" -u testuser:testpass123 http://localhost:8080/ || echo "000")
|
||||||
|
if [ "$response" = "200" ] || [ "$response" = "401" ] || [ "$response" = "403" ]; then
|
||||||
|
echo "WebDAV server is ready (HTTP $response)"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "Waiting for WebDAV server... ($i/30)"
|
echo "Waiting for WebDAV server... (attempt $i/30, HTTP response: $response)"
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Final verification
|
||||||
|
if ! curl -s -u testuser:testpass123 http://localhost:8080/ > /dev/null; then
|
||||||
|
echo "WARNING: WebDAV server may require authentication adjustments"
|
||||||
|
cat /tmp/dufs.log || true
|
||||||
|
fi
|
||||||
env:
|
env:
|
||||||
WEBDAV_SERVER_URL: http://localhost:8080
|
WEBDAV_SERVER_URL: http://localhost:8080
|
||||||
WEBDAV_USERNAME: testuser
|
WEBDAV_USERNAME: testuser
|
||||||
|
|
|
||||||
|
|
@ -158,23 +158,26 @@ jobs:
|
||||||
attempt=1
|
attempt=1
|
||||||
max_attempts=30
|
max_attempts=30
|
||||||
base_delay=1
|
base_delay=1
|
||||||
|
|
||||||
while [ $attempt -le $max_attempts ]; do
|
while [ $attempt -le $max_attempts ]; do
|
||||||
if curl -f "http://${{ secrets.WEBDAV_TEST_USERNAME || 'testuser' }}:${{ secrets.WEBDAV_TEST_PASSWORD || 'securepassword123' }}@localhost:8080/" > /dev/null 2>&1; then
|
# Test with basic auth header instead of URL auth
|
||||||
echo "Dufs WebDAV server is ready after $attempt attempts"
|
response=$(curl -s -o /dev/null -w "%{http_code}" -u "${{ secrets.WEBDAV_TEST_USERNAME || 'testuser' }}:${{ secrets.WEBDAV_TEST_PASSWORD || 'securepassword123' }}" http://localhost:8080/ || echo "000")
|
||||||
|
if [ "$response" = "200" ] || [ "$response" = "401" ] || [ "$response" = "403" ]; then
|
||||||
|
echo "Dufs WebDAV server is ready after $attempt attempts (HTTP $response)"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Exponential backoff with jitter
|
# Exponential backoff with jitter
|
||||||
delay=$(( base_delay * attempt + RANDOM % 3 ))
|
delay=$(( base_delay * attempt + RANDOM % 3 ))
|
||||||
echo "Waiting for Dufs server... (attempt $attempt/$max_attempts, delay ${delay}s)"
|
echo "Waiting for Dufs server... (attempt $attempt/$max_attempts, delay ${delay}s, HTTP response: $response)"
|
||||||
sleep $delay
|
sleep $delay
|
||||||
attempt=$(( attempt + 1 ))
|
attempt=$(( attempt + 1 ))
|
||||||
done
|
done
|
||||||
|
|
||||||
# Verify server with proper credentials
|
# Verify server responds
|
||||||
if ! curl -f "http://${{ secrets.WEBDAV_TEST_USERNAME || 'testuser' }}:${{ secrets.WEBDAV_TEST_PASSWORD || 'securepassword123' }}@localhost:8080/" > /dev/null 2>&1; then
|
response=$(curl -s -o /dev/null -w "%{http_code}" -u "${{ secrets.WEBDAV_TEST_USERNAME || 'testuser' }}:${{ secrets.WEBDAV_TEST_PASSWORD || 'securepassword123' }}" http://localhost:8080/ || echo "000")
|
||||||
echo "ERROR: Dufs server failed to start!"
|
if [ "$response" = "000" ]; then
|
||||||
|
echo "ERROR: Dufs server is not responding!"
|
||||||
cat dufs.log
|
cat dufs.log
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue