Compare commits
45 Commits
384ecdc51b
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 676a6a8a82 | |||
| 1973b7681f | |||
| a061e1766c | |||
| 8d41bb95cc | |||
|
|
adbf1c8057 | ||
|
|
6e90cba614 | ||
|
|
e48469f013 | ||
|
|
1ea3fff921 | ||
|
|
5d6f6eccc7 | ||
|
|
ee13450b6b | ||
|
|
2777fa5abe | ||
| e6e997c647 | |||
|
|
44d5a9734a | ||
|
|
560c13cb2f | ||
|
|
ef9e3e28d6 | ||
| 3228e2efb2 | |||
| 41c98aac30 | |||
| b3bc1a1650 | |||
| 70bc5ff17c | |||
| 6c2e4ebe18 | |||
| 364175bbcd | |||
| f84228f62c | |||
| 4177da615c | |||
| 45ab86252e | |||
|
|
951566ca55 | ||
|
|
b072686f7f | ||
|
|
85bc1731ff | ||
|
|
233c3992f5 | ||
|
|
8787afabf1 | ||
|
|
729a255139 | ||
| a18a103faf | |||
| 45d933b965 | |||
| 2f54bf729b | |||
| cf52be7c57 | |||
| 0a14e90f8a | |||
| d295667c9b | |||
| 40e94d96ae | |||
| a20f991573 | |||
| cc3d581ee7 | |||
|
|
27202da12d | ||
|
|
5a38d9cc83 | ||
|
|
41b7c6676e | ||
|
|
e32291df7b | ||
|
|
5a03cb7636 | ||
|
|
3b9721b0b1 |
68
breed_jenkins
Normal file
68
breed_jenkins
Normal file
@@ -0,0 +1,68 @@
|
||||
pipeline {
|
||||
agent any
|
||||
tools {
|
||||
maven 'mvn39'
|
||||
jdk 'jdk18'
|
||||
}
|
||||
stages {
|
||||
stage('拉取代码') {
|
||||
steps {
|
||||
checkout([
|
||||
$class: 'GitSCM',
|
||||
branches: [[name: '*/dev']],
|
||||
doGenerateSubmoduleConfigurations: false,
|
||||
extensions: [],
|
||||
submoduleCfg: [],
|
||||
userRemoteConfigs: [[url: 'http://git.sinoecare.com/sinoecare/breed_service.git', credentialsId:'b42f8b48-95a4-4039-ae51-b1dff06d943b']]
|
||||
])
|
||||
}
|
||||
}
|
||||
stage('构建打包') {
|
||||
steps {
|
||||
withEnv(['JAVA_HOME=/home/java/jdk_1.8.0']){
|
||||
sh 'mvn clean package -Dmaven.test.skip=true'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('部署') {
|
||||
steps {
|
||||
script {
|
||||
echo 'Deploying...'
|
||||
def projectDir = '/home/product/product_breed/app'
|
||||
def scriptPath = "/home/deploy/deploy_breed/run.sh"
|
||||
sh "mv target/breed-service.jar ."
|
||||
sshPublisher(publishers: [sshPublisherDesc(configName: 'test87', transfers: [sshTransfer(
|
||||
sourceFiles: "breed-service.jar",
|
||||
execCommand: "bash ${scriptPath}",
|
||||
remoteDirectory: "${projectDir}")
|
||||
], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: true)])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
script {
|
||||
echo 'Deployment finished successfully.'
|
||||
|
||||
def currentTime = new Date().format('yyyy-MM-dd HH:mm:ss', TimeZone.getTimeZone('Asia/Shanghai'))
|
||||
|
||||
sh """
|
||||
curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=1e734bc6-ab12-4272-8b15-cf92cb070f5b' \\
|
||||
-H 'Content-Type: application/json' \\
|
||||
-d '{
|
||||
"msgtype": "markdown",
|
||||
"markdown": {
|
||||
"content": ">构建结果:农业项目后端构建完成!\\n
|
||||
>完成时间:${currentTime}\\n
|
||||
>构建时间:${currentBuild.durationString}"
|
||||
}
|
||||
}'
|
||||
"""
|
||||
}
|
||||
}
|
||||
failure {
|
||||
echo 'Deployment failed.'
|
||||
}
|
||||
}
|
||||
}
|
||||
29
chuanqi_server_jenkins
Normal file
29
chuanqi_server_jenkins
Normal file
@@ -0,0 +1,29 @@
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('部署') {
|
||||
steps {
|
||||
echo 'Deploying...'
|
||||
sh "cd /home/cq/instance&&git pull"
|
||||
sh "docker restart chuanqi-server-logic"
|
||||
}
|
||||
}
|
||||
}
|
||||
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":"传奇服务端构建完成!",
|
||||
}'
|
||||
"""
|
||||
}
|
||||
failure {
|
||||
echo 'Deployment failed.'
|
||||
}
|
||||
}
|
||||
}
|
||||
34
chuanqi_server_pro_jenkins
Normal file
34
chuanqi_server_pro_jenkins
Normal file
@@ -0,0 +1,34 @@
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('部署') {
|
||||
steps {
|
||||
echo 'Deploying...'
|
||||
sshPublisher(publishers: [sshPublisherDesc(configName: 'chuanqi-xi',
|
||||
transfers: [sshTransfer(
|
||||
sourceFiles: '',
|
||||
execCommand: 'cd /opt/chuanqi/chuanqi-server-instance&&git pull&&docker restart chuanqi-server-logic',
|
||||
remoteDirectory: '.')
|
||||
], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: true)
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
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":"传奇服务端生产环境(pro)构建完成!",
|
||||
}'
|
||||
"""
|
||||
}
|
||||
failure {
|
||||
echo 'Deployment failed.'
|
||||
}
|
||||
}
|
||||
}
|
||||
52
chuanqi_web_config_jenkins
Normal file
52
chuanqi_web_config_jenkins
Normal file
@@ -0,0 +1,52 @@
|
||||
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.'
|
||||
}
|
||||
}
|
||||
}
|
||||
63
chuanqi_web_pro_jenkins
Normal file
63
chuanqi_web_pro_jenkins
Normal file
@@ -0,0 +1,63 @@
|
||||
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 deploy"
|
||||
}
|
||||
}
|
||||
stage('部署') {
|
||||
steps {
|
||||
echo 'Deploying...'
|
||||
sh 'ls -al'
|
||||
echo '部署奶昔服务器...'
|
||||
sshPublisher(publishers: [sshPublisherDesc(configName: 'chuanqi-xi',
|
||||
transfers: [sshTransfer(
|
||||
sourceFiles: "dist.zip",
|
||||
execCommand: "cd /opt/chuanqi/web&&mv ~/opt/chuanqi/web/dist.zip .&&unzip -o dist.zip&&mv -f main.min_jocw9Tu2.js js/&&mv -f config.xml resource_Publish/cfg/&&mv -f gameEui.json resource/&&rm -rf dist.zip&&chmod +x -R .",
|
||||
remoteDirectory: "/opt/chuanqi/web")
|
||||
], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: true)
|
||||
])
|
||||
echo '部署阿里服务器...'
|
||||
sshPublisher(publishers: [sshPublisherDesc(configName: 'ali',
|
||||
transfers: [sshTransfer(
|
||||
sourceFiles: "dist.zip",
|
||||
execCommand: "cd /opt/chuanqi/web&&mv ~/opt/chuanqi/web/dist.zip .&&unzip -o dist.zip&&mv -f main.min_jocw9Tu2.js js/&&mv -f config.xml resource_Publish/cfg/&&mv -f gameEui.json resource/&&rm -rf dist.zip&&chmod +x -R .",
|
||||
remoteDirectory: "/opt/chuanqi/web")
|
||||
], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: true)
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
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生产环境(pro)构建完成!",
|
||||
}'
|
||||
"""
|
||||
}
|
||||
failure {
|
||||
echo 'Deployment failed.'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user