ci(release): run production deploy with host paths
This commit is contained in:
@@ -118,7 +118,7 @@ jobs:
|
||||
run: |
|
||||
set -eu
|
||||
mkdir -p dist/release-artifacts
|
||||
tar --exclude=.git --exclude=apps/web/node_modules \
|
||||
tar --exclude=.git --exclude=apps/web/node_modules --exclude=dist \
|
||||
-czf "dist/release-artifacts/xiaoxia-release-${GITHUB_REF_NAME}.tar.gz" .
|
||||
|
||||
- name: Upload runtime image and release artifacts
|
||||
@@ -186,7 +186,7 @@ jobs:
|
||||
test -f /var/lib/xiaoxia-saas-production/repo/apps/web/dist/index.html
|
||||
test -f /var/lib/xiaoxia-saas-production/.env
|
||||
cp /var/lib/xiaoxia-saas-production/.env /var/lib/xiaoxia-saas-production/repo/.env
|
||||
sh /var/lib/xiaoxia-saas-production/repo/infra/docker/deploy-production.sh
|
||||
HOST_PREFIX= sh /var/lib/xiaoxia-saas-production/repo/infra/docker/deploy-production.sh
|
||||
i=0
|
||||
while [ "$i" -lt 30 ]; do
|
||||
if wget -qO- http://127.0.0.1:8001/health; then
|
||||
|
||||
@@ -166,6 +166,7 @@ def test_gitea_production_deploy_requires_runtime_builder_job():
|
||||
assert "docker.m.daocloud.io/library/node:20" in build_section
|
||||
assert "npm ci && npm run build" in build_section
|
||||
assert "dist/release-artifacts/xiaoxia-release-${GITHUB_REF_NAME}.tar.gz" in build_section
|
||||
assert "--exclude=dist" in build_section
|
||||
assert "PRODUCTION_SSH_HOST" in build_section
|
||||
assert "PRODUCTION_SSH_USER" in build_section
|
||||
assert "PRODUCTION_SSH_KEY" in build_section
|
||||
@@ -178,7 +179,7 @@ def test_gitea_production_deploy_requires_runtime_builder_job():
|
||||
assert "release_tar=\"/var/lib/xiaoxia-saas-production/release-${RELEASE_VERSION}.tar.gz\"" in production_section
|
||||
assert "runtime-images-${RELEASE_VERSION}.tar" in production_section
|
||||
assert "apps/web/dist/index.html" in production_section
|
||||
assert "sh /var/lib/xiaoxia-saas-production/repo/infra/docker/deploy-production.sh" in production_section
|
||||
assert "HOST_PREFIX= sh /var/lib/xiaoxia-saas-production/repo/infra/docker/deploy-production.sh" in production_section
|
||||
|
||||
|
||||
def test_build_host_runbook_requires_off_production_runtime_builds():
|
||||
|
||||
Reference in New Issue
Block a user