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:
5
Jenkinsfile
vendored
5
Jenkinsfile
vendored
@@ -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
|
||||||
"""
|
"""
|
||||||
|
|
||||||
// 启动新服务
|
// 启动新服务
|
||||||
|
|||||||
Reference in New Issue
Block a user