新增 Jenkins Pipeline 脚本以自动化部署传奇服务端pro
This commit is contained in:
29
chuanqi_server_pro_jenkins
Normal file
29
chuanqi_server_pro_jenkins
Normal file
@@ -0,0 +1,29 @@
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('部署') {
|
||||
steps {
|
||||
echo 'Deploying...'
|
||||
sh "cd /home/cq/s1&&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":"传奇服务端pro构建完成!",
|
||||
}'
|
||||
"""
|
||||
}
|
||||
failure {
|
||||
echo 'Deployment failed.'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user