Files
pipeline-scripts/chuanqi_server_pro_jenkins
aixianling ef9e3e28d6 ci(chuanqi): 更新 Jenkins 构建脚本
- 增加停止和重启 chuanqi-server-dev 容器的步骤
- 优化部署流程,确保开发环境和生产环境的一致性
2024-12-25 12:20:51 +08:00

32 lines
939 B
Plaintext

pipeline {
agent any
stages {
stage('部署') {
steps {
echo 'Deploying...'
sh "cd /home/cq/s1&&git pull"
sh "docker stop chuanqi-server-dev"
sh "docker restart chuanqi-server-s1"
sh "docker restart chuanqi-server-dev"
}
}
}
post{
success {
echo 'Deployment finished successfully.'
sh """
curl 'https://api.telegram.org/bot7816434196:AAFtmbUYpUIwcb_SvBnJY0guPIOLCxp2a5s/sendMessage' \\
-x http://192.168.25.110:20171\\
-H 'Content-Type: application/json' \\
-d '{
"chat_id": "6779541681",
"text":"传奇服务端生产环境(pro)构建完成!",
}'
"""
}
failure {
echo 'Deployment failed.'
}
}
}