perf: 部署步骤使用 alpine-openssh 镜像,省去每次 apk add 安装 SSH
This commit is contained in:
10
.drone.yml
10
.drone.yml
@@ -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 确保换行符正确写入
|
||||
|
||||
Reference in New Issue
Block a user