- 修改了 git pull 命令的执行路径为 /home/cq/chuanqi-server - 替换了 docker compose restart 命令,改为复制整个 chuanqi-server目录到 /home/cq/data
21 lines
438 B
Plaintext
21 lines
438 B
Plaintext
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('部署') {
|
|
steps {
|
|
echo 'Deploying...'
|
|
sh "cd /home/cq/chuanqi-server&&git pull"
|
|
sh "cp -r /home/cq/chuanqi-server /home/cq/data"
|
|
}
|
|
}
|
|
}
|
|
post{
|
|
success {
|
|
echo 'Deployment finished successfully.'
|
|
}
|
|
failure {
|
|
echo 'Deployment failed.'
|
|
}
|
|
}
|
|
}
|