Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/sp-deployment-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
username: ${{ vars.SSH_USER }}
key: ${{ secrets.SSH_KEY_PRIVATE }}
port: 22
script_stop: true
command_timeout: 2m
envs: INSTALL_FOLDER,SAMPLE_REPOSITORY,DEPLOY_BRANCH
script: |
set -e
echo "=== Pre-deployment checks ==="
cd $INSTALL_FOLDER

Expand All @@ -58,10 +58,10 @@ jobs:
username: ${{ vars.SSH_USER }}
key: ${{ secrets.SSH_KEY_PRIVATE }}
port: 22
script_stop: true
command_timeout: 10m
envs: INSTALL_FOLDER,SAMPLE_REPOSITORY,DEPLOY_BRANCH
script: |
set -e
echo "=== Deploying application ==="
cd $INSTALL_FOLDER

Expand Down Expand Up @@ -99,7 +99,6 @@ jobs:
username: ${{ vars.SSH_USER }}
key: ${{ secrets.SSH_KEY_PRIVATE }}
port: 22
script_stop: false
command_timeout: 2m
envs: INSTALL_FOLDER
script: |
Expand Down Expand Up @@ -139,7 +138,6 @@ jobs:
username: ${{ vars.SSH_USER }}
key: ${{ secrets.SSH_KEY_PRIVATE }}
port: 22
script_stop: false
command_timeout: 5m
envs: INSTALL_FOLDER,SAMPLE_REPOSITORY
script: |
Expand Down Expand Up @@ -175,7 +173,6 @@ jobs:
username: ${{ vars.SSH_USER }}
key: ${{ secrets.SSH_KEY_PRIVATE }}
port: 22
script_stop: false
command_timeout: 30s
envs: INSTALL_FOLDER
script: |
Expand Down
8 changes: 4 additions & 4 deletions install/deploy/post_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ echo "--- Health check ---"
for i in $(seq 1 $MAX_RETRIES); do
echo "Attempt $i/$MAX_RETRIES..."

# Try the /health endpoint first
HTTP_CODE=$(curl -s -o /tmp/health_response.json -w "%{http_code}" "$HEALTH_URL" 2>/dev/null || echo "000")
# Try the /health endpoint first (use -L to follow HTTP->HTTPS redirects)
HTTP_CODE=$(curl -sL -o /tmp/health_response.json -w "%{http_code}" "$HEALTH_URL" 2>/dev/null || echo "000")

if [ "$HTTP_CODE" = "200" ]; then
echo "✓ Health check passed (HTTP $HTTP_CODE)"
Expand All @@ -43,9 +43,9 @@ for i in $(seq 1 $MAX_RETRIES); do
echo "=== Deployment verified successfully ==="
exit 0
elif [ "$HTTP_CODE" = "404" ]; then
# Health endpoint doesn't exist, try fallback
# Health endpoint doesn't exist, try fallback (use -L to follow redirects)
echo "Health endpoint not found, trying fallback URL..."
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" "$FALLBACK_URL" 2>/dev/null || echo "000")
HTTP_CODE=$(curl -sL -o /dev/null -w "%{http_code}" "$FALLBACK_URL" 2>/dev/null || echo "000")
if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 400 ]; then
echo "✓ Fallback check passed (HTTP $HTTP_CODE)"
echo ""
Expand Down