ci(chuanqi_server): 更新 Jenkins 构建脚本
-移除了拉取代码阶段,改为在部署阶段直接使用 git pull 更新代码 - 简化了部署步骤,仅保留了重启 Docker 容器的操作
This commit is contained in:
@@ -1,25 +1,10 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
stages {
|
stages {
|
||||||
stage('拉取代码') {
|
|
||||||
steps {
|
|
||||||
checkout([
|
|
||||||
$class: 'GitSCM',
|
|
||||||
branches: [[name: '*/master']],
|
|
||||||
doGenerateSubmoduleConfigurations: false,
|
|
||||||
extensions: [],
|
|
||||||
submoduleCfg: [],
|
|
||||||
userRemoteConfigs: [[url: 'http://192.168.25.110:8999/kubbo/chuanqi-server.git',credentialsId:'d54e1035-acca-424e-80d0-9f7e29cab9c3']]
|
|
||||||
])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('部署') {
|
stage('部署') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Deploying...'
|
echo 'Deploying...'
|
||||||
sh "cp -rf server /home/cq/data"
|
sh "cd /home/cq/chuanqi-server&&git pull"
|
||||||
sh "cp -f run.sh /home/cq/data/run.sh"
|
|
||||||
sh "cp -f stop.sh /home/cq/data/stop.sh"
|
|
||||||
sh "cp -rf wch /home/cq/data"
|
|
||||||
sh "docker restart chuanqi-server"
|
sh "docker restart chuanqi-server"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user