Jenkins file edit
All checks were successful
test/timeline-frontend/pipeline/head This commit looks good
All checks were successful
test/timeline-frontend/pipeline/head This commit looks good
This commit is contained in:
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@@ -234,10 +234,11 @@ def deployToEnvironmentWithCompose(String env) {
|
||||
// 写入 docker-compose.yml 文件
|
||||
writeFile file: 'docker-compose.yml', text: composeFileContent
|
||||
|
||||
// 停止现有服务
|
||||
sh """
|
||||
docker compose -f docker-compose.yml down || true
|
||||
"""
|
||||
// 强制停止并删除现有容器(无论是否由compose创建)
|
||||
sh """
|
||||
docker stop ${containerName} || true
|
||||
docker rm ${containerName} || true
|
||||
"""
|
||||
|
||||
// 启动新服务
|
||||
sh """
|
||||
|
||||
Reference in New Issue
Block a user