ci: 更新 Jenkins 构建脚本
- 修改 sshagent 中的密钥 ID,从 'huawei68' 改为 '9333168e-6267-440b-9f24-87b29427e728' - 在 git pull 命令前添加 SSH 连接,确保远程服务器能够执行命令
This commit is contained in:
@@ -4,8 +4,8 @@ pipeline {
|
||||
stage('部署') {
|
||||
steps {
|
||||
echo 'Deploying...'
|
||||
sshagent(['huawei68']) {
|
||||
sh 'cd /mnt/data/docker/chuanqi-server-instance&&git pull'
|
||||
sshagent(['9333168e-6267-440b-9f24-87b29427e728']) {
|
||||
sh "ssh root@121.37.155.68 'cd /mnt/data/docker/chuanqi-server-instance&&git pull'"
|
||||
// sh 'docker restart chuanqi-server-logic'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user