From 42ed981d16f6a4e3e3b9102ffb6cce641375b606 Mon Sep 17 00:00:00 2001 From: "Andrey K. Choi" Date: Tue, 25 Nov 2025 18:21:43 +0900 Subject: [PATCH] Fix CI/CD: YAML syntax errors and missing netcat dependency - Fixed YAML formatting issues in staging deployment section - Added explicit netcat-openbsd installation before connectivity tests - Escaped DRONE_BRANCH variable in SSH commands to prevent YAML parsing errors - Fixed indentation and structure to ensure proper YAML validation --- .drone.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index d0e3008..264fb32 100644 --- a/.drone.yml +++ b/.drone.yml @@ -211,6 +211,7 @@ steps: - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -H $STAGING_HOST >> ~/.ssh/known_hosts 2>/dev/null || true - echo "Testing staging server connectivity..." + - apk add --no-cache netcat-openbsd - | if ! nc -z $STAGING_HOST 22 2>/dev/null; then echo "❌ Cannot connect to staging server on port 22" @@ -222,7 +223,7 @@ steps: ssh $STAGING_USER@$STAGING_HOST "cd /opt/smartsoltech-staging && echo 'Fetching latest changes...' && git fetch origin && - git reset --hard origin/${DRONE_BRANCH} && + git reset --hard origin/\${DRONE_BRANCH} && echo 'Restarting services...' && docker-compose down --timeout 30 && docker-compose pull && @@ -417,6 +418,7 @@ steps: exit 1 fi - echo "Testing SSH connectivity to $PROD_HOST..." + - apk add --no-cache netcat-openbsd - | if ! nc -z $PROD_HOST 22; then echo "❌ SSH port 22 is not accessible on $PROD_HOST"