Commit 59b9d254 by xujian

Merge branch 'feature/HTJ-2.04.001-滚动索引' into feature/htj-v2.04.001

# Conflicts:
#	Jenkinsfile
#	project.yaml
parents 512c8778 3a2bd7a4
...@@ -24,6 +24,7 @@ pipeline { ...@@ -24,6 +24,7 @@ pipeline {
gitParameter branchFilter: 'origin/(.*)', defaultValue: defaultBranch, name: 'CORE', type: 'PT_BRANCH_TAG', useRepository: '.*factory-tobacco-qrcodecore.git' // 后端 gitParameter branchFilter: 'origin/(.*)', defaultValue: defaultBranch, name: 'CORE', type: 'PT_BRANCH_TAG', useRepository: '.*factory-tobacco-qrcodecore.git' // 后端
gitParameter branchFilter: 'origin/(.*)', defaultValue: defaultBranch, name: 'HTJ', type: 'PT_BRANCH_TAG', useRepository: '.*factory-tobacco-qrcode-htj.git' // 后端 gitParameter branchFilter: 'origin/(.*)', defaultValue: defaultBranch, name: 'HTJ', type: 'PT_BRANCH_TAG', useRepository: '.*factory-tobacco-qrcode-htj.git' // 后端
gitParameter branchFilter: 'origin/(.*)', defaultValue: defaultBranch, name: 'WEB', type: 'PT_BRANCH_TAG', useRepository: '.*factory-tobacco-qrcode-htj-vue.git' // 后端 gitParameter branchFilter: 'origin/(.*)', defaultValue: defaultBranch, name: 'WEB', type: 'PT_BRANCH_TAG', useRepository: '.*factory-tobacco-qrcode-htj-vue.git' // 后端
booleanParam(name: 'DEPLOY', defaultValue: false, description: '是否部署')// 布尔值
} }
tools { tools {
...@@ -114,7 +115,7 @@ pipeline { ...@@ -114,7 +115,7 @@ pipeline {
script { script {
for (repo in repos) { for (repo in repos) {
dir(repo.dir) { dir(repo.dir) {
if ( repo.isUpdate && repo.type == 'mvn') sh "mvn -Dmaven.test.failure.ignore=true -s /var/lib/jenkins/settings-itimQR.xml package install" if ( repo.isUpdate && repo.type == 'mvn') sh "mvn -Dmaven.test.failure.ignore=true -s /var/lib/jenkins/settings-itimQR.xml clean package install"
else if ( repo.isUpdate && repo.type == 'node') sh "npm install --registry=https://registry.npmmirror.com && npm run build:prod-htj" else if ( repo.isUpdate && repo.type == 'node') sh "npm install --registry=https://registry.npmmirror.com && npm run build:prod-htj"
else echo "xxx" else echo "xxx"
} }
...@@ -128,7 +129,7 @@ pipeline { ...@@ -128,7 +129,7 @@ pipeline {
sh "export DOCKER_HOST=192.168.31.250" sh "export DOCKER_HOST=192.168.31.250"
for (module in modules) { for (module in modules) {
if(module.isUpdate && module.isEncryption){ if(module.isUpdate && module.isEncryption){
sh "cd ${module.dir}/${module.path} && mvn -Dmaven.test.failure.ignore=true -s /var/lib/jenkins/settings-itimQR.xml package install" sh "cd ${module.dir}/${module.path} && mvn -Dmaven.test.failure.ignore=true -s /var/lib/jenkins/settings-itimQR.xml clean package install"
sh "cd ${module.dir}/${module.path} && mvn -Dmaven.test.failure.ignore=true -s /var/lib/jenkins/settings-itimQR.xml classfinal:classFinal" sh "cd ${module.dir}/${module.path} && mvn -Dmaven.test.failure.ignore=true -s /var/lib/jenkins/settings-itimQR.xml classfinal:classFinal"
sh "docker build -f Docker/encryption/Dockerfile -t ${push_path}/${module.name}:${module.version} --build-arg FILE_NAME=${module.dir}/${module.path}/target/*-encrypted.jar ${workspace}" sh "docker build -f Docker/encryption/Dockerfile -t ${push_path}/${module.name}:${module.version} --build-arg FILE_NAME=${module.dir}/${module.path}/target/*-encrypted.jar ${workspace}"
sh "echo Qrcode@2022 | docker login https://192.168.31.201 --username admin --password-stdin" sh "echo Qrcode@2022 | docker login https://192.168.31.201 --username admin --password-stdin"
...@@ -137,7 +138,7 @@ pipeline { ...@@ -137,7 +138,7 @@ pipeline {
} }
if (module.isUpdate && !module.isEncryption) { if (module.isUpdate && !module.isEncryption) {
sh "cd ${module.dir}/${module.path} && mvn -Dmaven.test.failure.ignore=true -s /var/lib/jenkins/settings-itimQR.xml package install" sh "cd ${module.dir}/${module.path} && mvn -Dmaven.test.failure.ignore=true -s /var/lib/jenkins/settings-itimQR.xml clean package install"
sh "docker build -f Docker/noencryption/Dockerfile -t ${push_path}/${module.name}:${module.version} --build-arg FILE_NAME=${module.dir}/${module.path}/target/*.jar ${workspace}" sh "docker build -f Docker/noencryption/Dockerfile -t ${push_path}/${module.name}:${module.version} --build-arg FILE_NAME=${module.dir}/${module.path}/target/*.jar ${workspace}"
sh "echo Qrcode@2022 | docker login https://192.168.31.201 --username admin --password-stdin" sh "echo Qrcode@2022 | docker login https://192.168.31.201 --username admin --password-stdin"
sh "docker push ${push_path}/${module.name}:${module.version}" sh "docker push ${push_path}/${module.name}:${module.version}"
...@@ -170,12 +171,13 @@ pipeline { ...@@ -170,12 +171,13 @@ pipeline {
stage('步骤五: 服务部署'){ stage('步骤五: 服务部署'){
when { expression { return params.DEPLOY } }
steps { steps {
withCredentials([file(credentialsId: '00789dc5-a86e-427d-9a57-f5d02a52cb6e', variable: 'KUBECONFIG_FILE')]) { withCredentials([file(credentialsId: '00789dc5-a86e-427d-9a57-f5d02a52cb6e', variable: 'KUBECONFIG_FILE')]) {
script { script {
for( repo in repos ){ for( repo in repos ){
echo "xxx" echo "xxx"
if( repo.dir == "BASE") sh "KUBECONFIG=\$KUBECONFIG_FILE helm upgrade base base-charts/ -n base -f project.yaml" // if( repo.dir == "BASE") sh "KUBECONFIG=\$KUBECONFIG_FILE helm upgrade base base-charts/ -n base -f project.yaml"
if( repo.dir == "CORE") sh "KUBECONFIG=\$KUBECONFIG_FILE helm upgrade core core-charts/ -n core -f project.yaml" if( repo.dir == "CORE") sh "KUBECONFIG=\$KUBECONFIG_FILE helm upgrade core core-charts/ -n core -f project.yaml"
if( repo.dir == "HTJ") sh "KUBECONFIG=\$KUBECONFIG_FILE helm upgrade htj htj-charts/ -n htj -f project.yaml" if( repo.dir == "HTJ") sh "KUBECONFIG=\$KUBECONFIG_FILE helm upgrade htj htj-charts/ -n htj -f project.yaml"
if( repo.dir == "WEB") sh "KUBECONFIG=\$KUBECONFIG_FILE helm upgrade web qrcode-web/ -n dz-qrcode-web -f project.yaml" if( repo.dir == "WEB") sh "KUBECONFIG=\$KUBECONFIG_FILE helm upgrade web qrcode-web/ -n dz-qrcode-web -f project.yaml"
......
...@@ -10,8 +10,8 @@ spec: ...@@ -10,8 +10,8 @@ spec:
- name: gateway - name: gateway
port: {{ .Values.service.port }} port: {{ .Values.service.port }}
protocol: TCP protocol: TCP
targetPort: {{ .Values.service.port }} nodePort: {{ .Values.service.nodePort }}
selector: selector:
app: {{ .Values.service.select }}-deployment app: {{ .Values.service.select }}-deployment
sessionAffinity: None sessionAffinity: None
type: ClusterIP type: NodePort
\ No newline at end of file \ No newline at end of file
...@@ -41,3 +41,10 @@ core: ...@@ -41,3 +41,10 @@ core:
isUpdate: false isUpdate: false
isEncryption: false isEncryption: false
path: factory-tobacco-qrcode-modules-timesync path: factory-tobacco-qrcode-modules-timesync
service:
name: gateway
port: 8080
select: factory-tobacco-qrcode-gateway
nodePort: 30080
...@@ -4,6 +4,7 @@ tag: v24.09.20 ...@@ -4,6 +4,7 @@ tag: v24.09.20
PARAMS: "--spring.cloud.nacos.discovery.namespace=qrcode-pcb --spring.cloud.nacos.config.namespace=qrcode-pcb --spring.cloud.nacos.discovery.server-addr=nacos.dz-middleware.svc.cluster.local --spring.cloud.nacos.config.server-addr=nacos.dz-middleware.svc.cluster.local" PARAMS: "--spring.cloud.nacos.discovery.namespace=qrcode-pcb --spring.cloud.nacos.config.namespace=qrcode-pcb --spring.cloud.nacos.discovery.server-addr=nacos.dz-middleware.svc.cluster.local --spring.cloud.nacos.config.server-addr=nacos.dz-middleware.svc.cluster.local"
registry: 192.168.31.201/develop registry: 192.168.31.201/develop
htj: htj:
name: "HTJ" name: "HTJ"
type: "mvn" type: "mvn"
......
...@@ -4,10 +4,11 @@ pushPath: 192.168.31.201/htj_develop ...@@ -4,10 +4,11 @@ pushPath: 192.168.31.201/htj_develop
service: service:
name: gateway name: gateway
port: 8080 port: 8080
select: qrcode-gateway nodePort: 30080
select: factory-tobacco-qrcode-gateway
## 基础模块 ## 基础模块
version: v24.10.31 version: v24.09.26
# 如果项目base.isUpdate: true / core.isUpdate: true / htj.isUpdate: true 构建整个项目 # 如果项目base.isUpdate: false / core.isUpdate: false / htj.isUpdate: false 构建整个项目
# 如果模块为true指定项目打包 # 如果模块为true指定项目打包
base: base:
dir: "BASE" dir: "BASE"
...@@ -15,30 +16,6 @@ base: ...@@ -15,30 +16,6 @@ base:
url: "http://114.116.202.8:18808/factory-tobacco/factory-tobacco-basic.git" url: "http://114.116.202.8:18808/factory-tobacco/factory-tobacco-basic.git"
namespace: qrcode-xxx namespace: qrcode-xxx
isUpdate: true isUpdate: true
module:
- name: qrcode-auth
path: factory-tobacco-qrcode-auth
isEncryption: false
version: v24.11.12
isUpdate: true
- name: qrcode-gateway
path: factory-tobacco-qrcode-gateway
isEncryption: false
version: v24.11.12
isUpdate: true
- name: qrcode-file
path: factory-tobacco-qrcode-modules-file
isEncryption: false
version: v24.10.31
isUpdate: false
- name: qrcode-gen
path: factory-tobacco-qrcode-modules-gen
isEncryption: false
version: v24.10.31
isUpdate: false
core: core:
dir: "CORE" dir: "CORE"
...@@ -47,40 +24,64 @@ core: ...@@ -47,40 +24,64 @@ core:
namespace: qrcode-xxx namespace: qrcode-xxx
isUpdate: true isUpdate: true
module: module:
- name: qrcode-data-migrate - name: factory-tobacco-qrcode-auth
path: factory-tobacco-qrcode-auth
isEncryption: false
version: v25.02.13-2.04.001-index-cs
isUpdate: false
- name: factory-tobacco-qrcode-gateway
path: factory-tobacco-qrcode-gateway
isEncryption: false
version: v25.02.13-2.04.001-index-cs
isUpdate: false
- name: factory-tobacco-qrcode-modules-data-migrate
path: factory-tobacco-qrcode-modules-data-migrate path: factory-tobacco-qrcode-modules-data-migrate
isEncryption: false isEncryption: false
version: v24.11.12 version: v25.02.14.005-2.04.001-index-cs
isUpdate: true isUpdate: false
- name: qrcode-device - name: factory-tobacco-qrcode-modules-device
path: factory-tobacco-qrcode-modules-device path: factory-tobacco-qrcode-modules-device
isEncryption: false isEncryption: false
version: v24.11.12 version: v25.02.13-2.04.001-index-cs
isUpdate: true isUpdate: false
- name: qrcode-monitor-alarm - name: factory-tobacco-qrcode-modules-file
path: factory-tobacco-qrcode-modules-file
isEncryption: false
version: v25.02.13-2.04.001-index-cs
isUpdate: false
#
# - name: factory-tobacco-qrcode-modules-gen
# path: factory-tobacco-qrcode-modules-gen
# isEncryption: false
# version: v24.12.03.1-2.03.003-cs
# isUpdate: false
- name: factory-tobacco-qrcode-modules-monitor-alarm
path: factory-tobacco-qrcode-modules-monitor-alarm path: factory-tobacco-qrcode-modules-monitor-alarm
isEncryption: false isEncryption: false
version: v24.11.12 version: v25.02.13-2.04.001-index-cs
isUpdate: true isUpdate: false
- name: qrcode-stmb-register - name: factory-tobacco-qrcode-modules-stmb-register
path: factory-tobacco-qrcode-modules-stmb-register path: factory-tobacco-qrcode-modules-stmb-register
isEncryption: false isEncryption: false
version: v24.11.12 version: v25.02.13-2.04.001-index-cs
isUpdate: true isUpdate: false
- name: qrcode-system - name: factory-tobacco-qrcode-modules-system
path: factory-tobacco-qrcode-modules-system path: factory-tobacco-qrcode-modules-system
isEncryption: false isEncryption: false
version: v24.11.12 version: v25.02.13-2.04.001-index-cs
isUpdate: true isUpdate: false
- name: qrcode-timesync - name: factory-tobacco-qrcode-modules-timesync
path: factory-tobacco-qrcode-modules-timesync path: factory-tobacco-qrcode-modules-timesync
isEncryption: false isEncryption: false
version: v24.10.31 version: v25.02.13-2.04.001-index-cs
isUpdate: false isUpdate: false
htj: htj:
...@@ -90,64 +91,64 @@ htj: ...@@ -90,64 +91,64 @@ htj:
namespace: qrcode-xxx namespace: qrcode-xxx
isUpdate: true isUpdate: true
module: module:
- name: qrcode-monitoring-platform - name: factory-tobacco-qrcode-module-monitoring-platform
path: factory-tobacco-qrcode-module-monitoring-platform path: factory-tobacco-qrcode-module-monitoring-platform
isEncryption: false isEncryption: false
version: v24.11.12 version: v25.02.18-2.04.001-index-cs
isUpdate: true isUpdate: true
- name: qrcode-product-syncmes - name: factory-tobacco-qrcode-module-product-syncmes
path: factory-tobacco-qrcode-module-product-syncmes path: factory-tobacco-qrcode-module-product-syncmes
isEncryption: false isEncryption: false
version: v24.10.31 version: v25.02.18-2.04.001-index-cs
isUpdate: false isUpdate: true
- name: qrcode-db-version-control - name: factory-tobacco-qrcode-modules-db-version-control
path: factory-tobacco-qrcode-modules-db-version-control path: factory-tobacco-qrcode-modules-db-version-control
isEncryption: false isEncryption: false
version: v24.10.32 version: v25.02.13-2.04.001-index-cs
isUpdate: true isUpdate: false
- name: qrcode-iotege-relation - name: factory-tobacco-qrcode-modules-iotege-relation
path: factory-tobacco-qrcode-modules-iotege-relation path: factory-tobacco-qrcode-modules-iotege-relation
isEncryption: false isEncryption: false
version: v24.10.31 version: v25.02.13-2.04.001-index-cs
isUpdate: false isUpdate: false
- name: qrcode-product-bloomfilter # - name: factory-tobacco-qrcode-modules-product-bloomfilter
path: factory-tobacco-qrcode-modules-product-bloomfilter # path: factory-tobacco-qrcode-modules-product-bloomfilter
isEncryption: false # isEncryption: false
version: v24.10.31 # version: v25.02.13-2.04.001-index-cs
isUpdate: false # isUpdate: false
- name: qrcode-product-relation - name: factory-tobacco-qrcode-modules-product-relation
path: factory-tobacco-qrcode-modules-product-relation path: factory-tobacco-qrcode-modules-product-relation
isEncryption: false isEncryption: false
version: v24.11.12 version: v25.02.18-2.04.001-index-cs
isUpdate: true isUpdate: true
- name: qrcode-product-report - name: factory-tobacco-qrcode-modules-product-report
path: factory-tobacco-qrcode-modules-product-report path: factory-tobacco-qrcode-modules-product-report
isEncryption: false isEncryption: false
version: v24.11.12 version: v25.02.13-2.04.001-index-cs
isUpdate: true isUpdate: false
- name: qrcode-product-statistics - name: factory-tobacco-qrcode-modules-product-statistics
path: factory-tobacco-qrcode-modules-product-statistics path: factory-tobacco-qrcode-modules-product-statistics
isEncryption: false isEncryption: false
version: v24.10.31 version: v25.02.18-2.04.001-index-cs
isUpdate: false isUpdate: true
- name: qrcode-product-upload - name: factory-tobacco-qrcode-modules-product-upload
path: factory-tobacco-qrcode-modules-product-upload path: factory-tobacco-qrcode-modules-product-upload
isEncryption: true isEncryption: true
version: v24.11.12 version: v25.02.18-2.04.001-index-cs
isUpdate: true isUpdate: true
- name: qrcode-wip-relation - name: factory-tobacco-qrcode-modules-wip-relation
path: factory-tobacco-qrcode-modules-wip-relation path: factory-tobacco-qrcode-modules-wip-relation
isEncryption: false isEncryption: false
version: v24.10.31 version: v25.02.13-2.04.001-index-cs
isUpdate: false isUpdate: false
web: web:
...@@ -155,6 +156,6 @@ web: ...@@ -155,6 +156,6 @@ web:
name: "qrcode-web" name: "qrcode-web"
type: "node" type: "node"
url: "http://114.116.202.8:18808/factory-tobacco/factory-tobacco-qrcode-htj-vue.git" url: "http://114.116.202.8:18808/factory-tobacco/factory-tobacco-qrcode-htj-vue.git"
# isEncryption: false # isEncryption: false
version: v24.11.04-2.03.002-kf version: v25.02.13-2.04.001-index-cs
isUpdate: true isUpdate: false
...@@ -22,7 +22,7 @@ data: ...@@ -22,7 +22,7 @@ data:
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://gateway.base.svc.cluster.local:8080/; proxy_pass http://gateway.core.svc.cluster.local:8080/;
} }
# 子系统访问厂级 # 子系统访问厂级
...@@ -31,7 +31,7 @@ data: ...@@ -31,7 +31,7 @@ data:
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://gateway.base.svc.cluster.local:8080/; proxy_pass http://gateway.core.svc.cluster.local:8080/;
} }
# 调控到边侧 # 调控到边侧
...@@ -40,7 +40,7 @@ data: ...@@ -40,7 +40,7 @@ data:
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://gateway.base.svc.cluster.local:8080/; proxy_pass http://gateway.core.svc.cluster.local:8080/;
client_max_body_size 20m; client_max_body_size 20m;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment