pipeline { agent any 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:'b42f8b48-95a4-4039-ae51-b1dff06d943b']] ]) } } stage('部署') { steps { echo 'Deploying...' sh "cp -rf server /home/cq/data/server" 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/wch" } } } post{ success { echo 'Deployment finished successfully.' } failure { echo 'Deployment failed.' } } }