Files
pipeline-scripts/chuanqi_server_pro_jenkins
kubbo 8d41bb95cc build(deploy): 更新传棋项目部署配置
- 修改服务器配置名称:将 'huawei68' 和 'tencent-SG' 更改为 'chuanqi-xi'
- 更新部署路径:将 '/mnt/data/docker/' 和 '/home/chuanqi/' 更改为 '/opt/chuanqi/'
- 调整 chuanqi_web_pro_jenkins 中的 remoteDirectory 参数
2025-04-17 15:46:28 +08:00

35 lines
1.2 KiB
Plaintext

pipeline {
agent any
stages {
stage('部署') {
steps {
echo 'Deploying...'
sshPublisher(publishers: [sshPublisherDesc(configName: 'chuanqi-xi',
transfers: [sshTransfer(
sourceFiles: '',
execCommand: 'cd /opt/chuanqi/chuanqi-server-instance&&git pull&&docker restart chuanqi-server-logic',
remoteDirectory: '.')
], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: true)
])
}
}
}
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.'
}
}
}