perf: 部署步骤使用 alpine-openssh 镜像,省去每次 apk add 安装 SSH

This commit is contained in:
mediabot-pt
2026-06-29 12:59:09 +08:00
parent 180022e42d
commit 0e74734636

View File

@@ -254,7 +254,7 @@ steps:
# ===================== Test:部署到测试服务器 =====================
- name: deploy-test
image: 192.168.31.253/library/alpine:latest
image: 192.168.31.253/library/alpine-openssh:latest
environment:
DEPLOY_IMAGE: "192.168.31.253/yescent/${DRONE_REPO_NAME}"
APP_PORT: "9012"
@@ -269,9 +269,6 @@ steps:
echo "====== 部署测试环境 ======"
source /drone/src/.version.env
# 安装新版 openssh-client
apk add --no-cache openssh-client
mkdir -p ~/.ssh
chmod 700 ~/.ssh
# 使用 printf 确保换行符正确写入
@@ -340,7 +337,7 @@ steps:
branch: [main]
- name: deploy-main
image: 192.168.31.253/library/alpine:latest
image: 192.168.31.253/library/alpine-openssh:latest
environment:
DEPLOY_IMAGE: "192.168.31.253/yescent/${DRONE_REPO_NAME}"
APP_PORT: "9012"
@@ -355,9 +352,6 @@ steps:
echo "====== 部署生产环境 ======"
source /drone/src/.version.env
# 安装新版 openssh-client
apk add --no-cache openssh-client
mkdir -p ~/.ssh
chmod 700 ~/.ssh
# 使用 printf 确保换行符正确写入