fix: Drone 生产包镜像与文件名固定为 v1.1.0,便于现网部署
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
c2c5078ee6
commit
6a9a8bddd6
3 files changed
+23
-21
No files matched your search
+10
-10
@@ -1,6 +1,7 @@
|
||||
# 生产 Docker 交付包:仅 tag 触发
|
||||
# 产物:/root/zkxw-releases/zkxw-docker-deploy-<tag>.tar.gz
|
||||
# 脚本:./scripts/package-docker-deploy.sh(docker build + save + 组包)
|
||||
# 镜像与包名固定为 v1.1.0(与现网 .env / 部署习惯一致),便于生产升级时不必改镜像标签
|
||||
# 产物:/root/zkxw-releases/zkxw-docker-deploy-v1.1.0.tar.gz
|
||||
# 脚本:./scripts/package-docker-deploy.sh
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
@@ -39,13 +40,12 @@ steps:
|
||||
NPM_REGISTRY: https://registry.npmmirror.com
|
||||
PIP_INDEX_URL: https://mirrors.aliyun.com/pypi/simple/
|
||||
PIP_TRUSTED_HOST: mirrors.aliyun.com
|
||||
# 若宿主机存在该文件,可在打包前复制为 deploy/docker/.env 以注入微信/RSA
|
||||
# 见 测试环境部署/drone/README.md
|
||||
# 固定交付版本(勿改为 DRONE_TAG,生产 .env 使用 v1.1.0)
|
||||
ZKXW_DEPLOY_VERSION: v1.1.0
|
||||
commands:
|
||||
- set -eu
|
||||
- apk add --no-cache bash git python3
|
||||
- test -n "${DRONE_TAG}"
|
||||
- echo "==> packaging production docker bundle for tag=${DRONE_TAG}"
|
||||
- echo "==> git tag=${DRONE_TAG:-none} deploy_version=${ZKXW_DEPLOY_VERSION} commit=${DRONE_COMMIT}"
|
||||
- chmod +x scripts/package-docker-deploy.sh scripts/build-docker-images.sh
|
||||
- |
|
||||
if [ -f /releases/.deploy-docker.env ]; then
|
||||
@@ -53,8 +53,8 @@ steps:
|
||||
cp /releases/.deploy-docker.env deploy/docker/.env
|
||||
echo "using /releases/.deploy-docker.env for secret inject"
|
||||
fi
|
||||
- ./scripts/package-docker-deploy.sh "${DRONE_TAG}"
|
||||
- ./scripts/package-docker-deploy.sh "${ZKXW_DEPLOY_VERSION}"
|
||||
- mkdir -p /releases
|
||||
- cp -v dist/zkxw-docker-deploy-"${DRONE_TAG}".tar.gz /releases/
|
||||
- ls -lh /releases/zkxw-docker-deploy-"${DRONE_TAG}".tar.gz
|
||||
- sha256sum /releases/zkxw-docker-deploy-"${DRONE_TAG}".tar.gz
|
||||
- cp -v dist/zkxw-docker-deploy-"${ZKXW_DEPLOY_VERSION}".tar.gz /releases/
|
||||
- ls -lh /releases/zkxw-docker-deploy-"${ZKXW_DEPLOY_VERSION}".tar.gz
|
||||
- sha256sum /releases/zkxw-docker-deploy-"${ZKXW_DEPLOY_VERSION}".tar.gz
|
||||
Reference in new issue
Block a user