Files
pipeline-scripts/chuanqi_web_config_jenkins
aixianling 5d6f6eccc7 ci: 更新 web 项目配置和生产环境部署
- 在 web 配置中添加 gameEui.json 文件复制操作
- 在生产环境部署中添加 gameEui.json 文件移动操作
2025-01-21 17:33:58 +08:00

53 lines
1.7 KiB
Plaintext

pipeline {
agent any
stages {
stage('拉取代码') {
steps {
checkout([
$class: 'GitSCM',
branches: [[name: '*/main']],
doGenerateSubmoduleConfigurations: false,
extensions: [],
submoduleCfg: [],
userRemoteConfigs: [[url: 'http://192.168.25.110:8999/kubbo/chuanqi-client-config.git',credentialsId:'d54e1035-acca-424e-80d0-9f7e29cab9c3']]
])
}
}
stage('打包') {
steps {
echo "正在打包的工程==>: ${params.pid}"
sh "npm i"
sh "npm run build"
}
}
stage('部署') {
steps {
echo 'Deploying...'
sh "cp config.xml /home/cq/web/resource_Publish/cfg/"
sh "cp main.min_jocw9Tu2.js /home/cq/web/js/"
sh "cp linuxdo.php /home/cq/web/"
sh "cp login.php /home/cq/web/"
sh "cp api.php /home/cq/web/"
sh "cp gameEui.json /home/cq/web/resource"
}
}
}
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":"传奇web构建完成!",
}'
"""
}
failure {
echo 'Deployment failed.'
}
}
}