Jenkins file edit
All checks were successful
test/timeline-frontend/pipeline/head This commit looks good

This commit is contained in:
2025-12-30 13:59:29 +08:00
parent 3f68693486
commit d6b8048a01

5
Jenkinsfile vendored
View File

@@ -234,9 +234,10 @@ def deployToEnvironmentWithCompose(String env) {
// 写入 docker-compose.yml 文件 // 写入 docker-compose.yml 文件
writeFile file: 'docker-compose.yml', text: composeFileContent writeFile file: 'docker-compose.yml', text: composeFileContent
// 停止现有服务 // 强制停止并删除现有容器无论是否由compose创建
sh """ sh """
docker compose -f docker-compose.yml down || true docker stop ${containerName} || true
docker rm ${containerName} || true
""" """
// 启动新服务 // 启动新服务