no message

This commit is contained in:
2025-09-11 13:40:33 +08:00
parent d94dcc163f
commit 402b372771
2 changed files with 8 additions and 6 deletions

8
Jenkinsfile vendored
View File

@ -4,7 +4,7 @@ pipeline {
// maven 'M3' // 必须在 Jenkins → Manage Jenkins → Global Tool Configuration 中配置过
// }
environment {
APP_NAME = "sczx_sync"
APP_NAME = "sczx-sync"
DOCKER_IMAGE = "${APP_NAME}:latest"
CONTAINER_NAME = "${APP_NAME}-container"
}
@ -49,9 +49,9 @@ pipeline {
steps {
echo "🛑 正在停止旧的容器(如果存在)..."
sh '''
if [ "$(docker ps -f 'name=sczx_sync-container' --format '{{.Status}}')" ]; then
docker stop sczx_sync-container
docker rm sczx_sync-container
if [ "$(docker ps -f 'name=sczx-sync-container' --format '{{.Status}}')" ]; then
docker stop sczx-sync-container
docker rm sczx-sync-container
fi
'''
}