Skip to content
Success

Parameters

NODE_BUILD_CMD
Frontend build command
npm install --cache "$NPM_CACHE_DIR" --prefer-offline && npm run build:prod
Deploy to remote server
DEPLOY_MODE
Deploy to local Jenkins server or remote SSH host
local
HOST_JENKINS_DIR
Host path mounted as JENKINS_HOME
/zoumh/data/jenkins
NODE_IMAGE
Container image used for frontend builds
node:20-bullseye
DEPLOY_DIR
Remote frontend artifact directory
/zoumh/java/zmh/frontend
NGINX_HTML_DIR
Frontend static html directory
/zoumh/data/nginx/www/zoumh.com
NGINX_CONF_DIR
Frontend nginx config directory
/zoumh/java/zmh/frontend/nginx
DEPLOY_SCRIPT_DIR
Remote frontend script directory
/zoumh/java/zmh/frontend/bin
SSH_HOST
Deploy host when DEPLOY_MODE=ssh
156.225.28.110
SSH_USER
Deploy user when DEPLOY_MODE=ssh
root
SSH_CREDENTIALS_ID
SSH credentials id in Jenkins
zoumh-ssh
NPM_CACHE_DIR
Persistent npm cache directory
/zoumh/data/jenkins/caches/npm
NGINX_IMAGE
Frontend nginx image
nginx:1.27-alpine
NGINX_CONTAINER_NAME
Frontend container name
ruoyi-nginx
FRONTEND_PROXY_PASS
Backend gateway proxy target
http://127.0.0.1:8080/
POST_DEPLOY_CMD
Optional command after frontend files are extracted
echo "=== curl host gateway from nginx container ===" docker exec nginx sh -lc "apk add --no-cache curl >/dev/null 2>&1 || true; echo '--- GET / ---'; curl -sS -i http://172.21.0.1:8080/ || true; echo '--- GET /auth/login ---'; curl -sS -i http://172.21.0.1:8080/auth/login || true; echo '--- GET /actuator/health ---'; curl -sS -i http://172.21.0.1:8080/actuator/health || true" || true echo "=== gateway log tail ===" tail -n 120 /zoumh/java/zmh/backend/logs/ruoyi-gateway.log || true echo "=== auth log tail ===" tail -n 120 /zoumh/java/zmh/backend/logs/ruoyi-auth.log || true