Files
pipeline-scripts/chuanqi_server_jenkins
aixianling 729a255139 ci(chuanqi_server_jenkins): 更新部署路径和容器名称
- 将部署路径从 /home/cq/chuanqi-server 修改为 /home/cq/instance
- 将重启的容器名称从 chuanqi-server 修改为 chuanqi-server-dev
2024-12-16 15:17:46 +08:00

30 lines
822 B
Plaintext

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