mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-16 13:08:03 +00:00
Fix deployment verification: install git and improve fallback logic
- Install git in deployment verification jobs (was missing in Alpine image) - Add string comparison fallback when git commands fail - Safer approach: wait for deployment when commit comparison fails - This ensures we don't run performance tests against wrong versions - Fixes 'No such file or directory: git' error in CI
This commit is contained in:
@@ -232,7 +232,7 @@ verify_dev_deployment:
|
|||||||
MAX_RETRIES: 30
|
MAX_RETRIES: 30
|
||||||
RETRY_DELAY: 60
|
RETRY_DELAY: 60
|
||||||
before_script:
|
before_script:
|
||||||
- apk add --no-cache curl
|
- apk add --no-cache curl git
|
||||||
- pip install Pillow
|
- pip install Pillow
|
||||||
script:
|
script:
|
||||||
- echo "Waiting for dev.libravatar.org deployment to complete..."
|
- echo "Waiting for dev.libravatar.org deployment to complete..."
|
||||||
@@ -250,7 +250,7 @@ verify_prod_deployment:
|
|||||||
MAX_RETRIES: 10
|
MAX_RETRIES: 10
|
||||||
RETRY_DELAY: 30
|
RETRY_DELAY: 30
|
||||||
before_script:
|
before_script:
|
||||||
- apk add --no-cache curl
|
- apk add --no-cache curl git
|
||||||
- pip install Pillow
|
- pip install Pillow
|
||||||
script:
|
script:
|
||||||
- echo "Verifying production deployment..."
|
- echo "Verifying production deployment..."
|
||||||
|
|||||||
@@ -427,13 +427,21 @@ def test_deployment(
|
|||||||
)
|
)
|
||||||
version_ok = False
|
version_ok = False
|
||||||
else:
|
else:
|
||||||
|
# Git comparison failed - use simple string comparison as fallback
|
||||||
colored_print(
|
colored_print(
|
||||||
"⚠️ Warning: Could not determine version relationship",
|
"⚠️ Git comparison failed - using string comparison fallback",
|
||||||
|
Colors.YELLOW,
|
||||||
|
)
|
||||||
|
|
||||||
|
# If commits are different, assume we need to wait
|
||||||
|
# This is safer than proceeding with wrong version
|
||||||
|
colored_print(
|
||||||
|
f"⚠️ Deployed version ({deployed_commit[:8]}) differs from expected ({current_commit[:8]})",
|
||||||
Colors.YELLOW,
|
Colors.YELLOW,
|
||||||
)
|
)
|
||||||
colored_print(
|
colored_print(
|
||||||
"This might be due to shallow git clone in CI - treating as version mismatch",
|
f"Waiting for deployment to update... (attempt {attempt}/{max_retries})",
|
||||||
Colors.YELLOW,
|
Colors.BLUE,
|
||||||
)
|
)
|
||||||
version_ok = False
|
version_ok = False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user