Files
pipeline-scripts/chuanqi_server_jenkins
kubbo a18a103faf ci(chuanqi_server): 更新 Jenkins 构建脚本
-移除了拉取代码阶段,改为在部署阶段直接使用 git pull 更新代码
- 简化了部署步骤,仅保留了重启 Docker 容器的操作
2024-12-14 21:20:15 +08:00

30 lines
824 B
Plaintext

pipeline {
agent any
stages {
stage('部署') {
steps {
echo 'Deploying...'
sh "cd /home/cq/chuanqi-server&&git pull"
sh "docker restart chuanqi-server"
}
}
}
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":"传奇服务端构建完成!",
}'
"""
}
failure {
echo 'Deployment failed.'
}
}
}