Mod QDXWL-1790 BYMC 1. 删除k8s多余配置

2. 更新SpringBoot版本到3.5.0
This commit is contained in:
HuangXin 2025-05-20 09:50:13 +08:00
parent 88bcd9b3d2
commit a9fee63cc7
13 changed files with 7 additions and 872 deletions

View File

@ -1,81 +0,0 @@
#!/bin/bash
echo "--------------------------------------"
#export MODULE_VERSION=$(xmllint --xpath "/*[local-name()='project']/*[local-name()='version']/text()" pom.xml)
export MODULE_VERSION=$(xmllint --xpath "/*[local-name()='project']/*[local-name()='properties']/*[local-name()='revision']/text()" pom.xml)
#export SPRING_BOOT_VERSION=3.2.5
export HUB_PROJECT=qdxwl
export MODULE_START=.
export NAMESPACE=qdxwl
#export MODULE_NAME=$(xmllint --xpath "/*[local-name()='project']/*[local-name()='artifactId']/text()" pom.xml)
export MODULE_NAME=middleware-agent
export TRIMMED_MESSAGE=""
export GIT_VERSION=""
export DIR_DEPLOY="deploy"
init() {
echo "设置项目基本信息"
# export JAVA_HOME=/nasdata/jenkins/tools/jdk-17.0.6
echo "-------------JDK 环境变量 JAVA_HOME: ${JAVA_HOME}"
docker login -u cmaqb -p "${cmaqb}" hub.komect.com:10443
echo "-------------登陆 harbub"
LATEST_COMMIT_MESSAGE=$(git log -1 --pretty=%B)
TRIMMED_MESSAGE=$(echo "${LATEST_COMMIT_MESSAGE}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
echo "-------------获取 git message ${TRIMMED_MESSAGE}"
GIT_VERSION=$(git describe --abbrev=8 --tags --always)
echo "-------------获取 git abbrev ${GIT_VERSION}"
}
download_kubernetes_config() {
# svn export --force http://svn.komect.net/aqb/YJSP/docs/工程/能力平台/4实现文档/cicd/kube/kube-config.yml ./ --username cmaqb --password ${cmaqb} --no-auth-cache
echo "-------------获取 kube-config.yml"
}
deploy(){
echo "mvn -v"
mvn -v
echo "部署 ${MODULE_NAME}"
mvn clean install -Dmaven.test.skip
# 检查Maven命令的退出状态
if [ $? -eq 0 ]; then
echo "Maven build succeeded."
else
echo "Maven build failed."
exit 1
fi
# mvn spring-boot:build-image -f ${MODULE_START}/pom.xml
mvn -f "${MODULE_START}/pom.xml" clean -Dmaven.test.skip=true org.springframework.boot:spring-boot-maven-plugin:build-image
# mvn -f "${MODULE_START}/pom.xml" clean -Dmaven.test.skip=true org.springframework.boot:spring-boot-maven-plugin:"${SPRING_BOOT_VERSION}":build-image
export IMAGE=hub.komect.com:10443/"${HUB_PROJECT}/${MODULE_NAME}:${MODULE_VERSION}-${GIT_VERSION}"
echo "模块名称 ${MODULE_NAME}, 镜像名称 ${IMAGE}"
docker push "${IMAGE}"
# 如果存在application.properties,潜在的密文内容,做base64编码
# export SECRET_BASE64_DATA=""
# if [ -e "./src/main/resources/application-dev.properties" ]; then
# export SECRET_BASE64_DATA=$(base64 -w 0 ./src/main/resources/application-dev.properties)
# fi
# 存在configmap.yml,则执行configmap部署
if [ -e "k8s/${DIR_DEPLOY}/configmap.yml" ]; then
envsubst < k8s/${DIR_DEPLOY}/configmap.yml | kubectl apply --kubeconfig=k8s/kube/kube-config.yml -f -
fi
# 存在secret.yml,则执行secret部署
if [ -e "k8s/${DIR_DEPLOY}/secret.yml" ]; then
envsubst < k8s/${DIR_DEPLOY}/secret.yml | kubectl apply --kubeconfig=k8s/kube/kube-config.yml -f -
fi
envsubst < k8s/${DIR_DEPLOY}/deployment.yml | kubectl apply --kubeconfig=k8s/kube/kube-config.yml -f -
# envsubst < k8s/${DIR_DEPLOY}/service.yml | kubectl apply --kubeconfig=k8s/kube/kube-config.yml -f -
}
init
download_kubernetes_config
if [[ "${TRIMMED_MESSAGE}" != *-A* ]] && [[ "${TRIMMED_MESSAGE}" == *-d* ]]; then
echo "包含 -d 执行部署"
deploy
fi

View File

@ -1,325 +0,0 @@
# Copyright 2018-2020 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
api = "0.7"
[buildpack]
description = "A Cloud Native Buildpack that provides the Bellsoft Liberica implementations of JREs and JDKs"
homepage = "https://github.com/paketo-buildpacks/bellsoft-liberica"
id = "paketo-buildpacks/bellsoft-liberica"
keywords = ["java", "jvm", "jre", "jdk"]
name = "Paketo Buildpack for BellSoft Liberica"
sbom-formats = ["application/vnd.syft+json", "application/vnd.cyclonedx+json"]
version = "10.4.3"
[[buildpack.licenses]]
type = "Apache-2.0"
uri = "https://github.com/paketo-buildpacks/bellsoft-liberica/blob/main/LICENSE"
[metadata]
include-files = ["LICENSE", "NOTICE", "README.md", "bin/build", "bin/detect", "bin/helper", "bin/main", "buildpack.toml"]
pre-package = "scripts/build.sh"
[[metadata.configurations]]
default = "0"
description = "the headroom in memory calculation"
launch = true
name = "BPL_JVM_HEAD_ROOM"
[[metadata.configurations]]
default = "35% of classes"
description = "the number of loaded classes in memory calculation"
launch = true
name = "BPL_JVM_LOADED_CLASS_COUNT"
[[metadata.configurations]]
default = "250"
description = "the number of threads in memory calculation"
launch = true
name = "BPL_JVM_THREAD_COUNT"
[[metadata.configurations]]
default = ""
description = "write heap dumps on error to this path"
launch = true
name = "BPL_HEAP_DUMP_PATH"
[[metadata.configurations]]
default = "true"
description = "enables Java Native Memory Tracking (NMT)"
launch = true
name = "BPL_JAVA_NMT_ENABLED"
[[metadata.configurations]]
default = "summary"
description = "configure level of NMT, summary or detail"
launch = true
name = "BPL_JAVA_NMT_LEVEL"
[[metadata.configurations]]
default = "false"
description = "enables Java Management Extensions (JMX)"
launch = true
name = "BPL_JMX_ENABLED"
[[metadata.configurations]]
default = "5000"
description = "configure the JMX port"
launch = true
name = "BPL_JMX_PORT"
[[metadata.configurations]]
default = "false"
description = "enables Java remote debugging support"
launch = true
name = "BPL_DEBUG_ENABLED"
[[metadata.configurations]]
default = "8000"
description = "configure the remote debugging port"
launch = true
name = "BPL_DEBUG_PORT"
[[metadata.configurations]]
default = "false"
description = "configure whether to suspend execution until a debugger has attached"
launch = true
name = "BPL_DEBUG_SUSPEND"
[[metadata.configurations]]
default = "false"
description = "enables Java Flight Recording (JFR)"
launch = true
name = "BPL_JFR_ENABLED"
[[metadata.configurations]]
default = ""
description = "configure custom Java Flight Recording (JFR) arguments"
launch = true
name = "BPL_JFR_ARGS"
[[metadata.configurations]]
build = true
default = "false"
description = "enables running jlink tool to generate custom JRE"
name = "BP_JVM_JLINK_ENABLED"
[[metadata.configurations]]
build = true
default = "--no-man-pages --no-header-files --strip-debug --compress=1"
description = "configure custom link arguments (--output must be omitted)"
name = "BP_JVM_JLINK_ARGS"
[[metadata.configurations]]
build = true
default = "17"
description = "the Java version"
name = "BP_JVM_VERSION"
[[metadata.configurations]]
build = true
default = "JRE"
description = "the JVM type - JDK or JRE"
name = "BP_JVM_TYPE"
[[metadata.configurations]]
description = "the JVM launch flags"
launch = true
name = "JAVA_TOOL_OPTIONS"
[[metadata.dependencies]]
cpes = ["cpe:2.3:a:oracle:jdk:1.8.0:update392:*:*:*:*:*:*:*"]
id = "jdk"
name = "BellSoft Liberica JDK"
purl = "pkg:generic/bellsoft-jdk@8.0.382?arch=amd64"
sha256 = "4df319a91b11f342dd616fbbd0e76379c710b1b6ef904c9137ec38d8134842ce"
source = "https://github.com/bell-sw/Liberica/releases/download/8u392+9/bellsoft-jdk8u392+9-src.tar.gz"
source-sha256 = "d0be2e70be6ffb58aa8a53577fdb1b9d9e67e16bb3d83feee5687395643c0d1b"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "https://github.com/bell-sw/Liberica/releases/download/8u392+9/bellsoft-jdk8u392+9-linux-amd64.tar.gz"
version = "8.0.392"
[[metadata.dependencies.licenses]]
type = "GPL-2.0 WITH Classpath-exception-2.0"
uri = "https://openjdk.java.net/legal/gplv2+ce.html"
[[metadata.dependencies]]
cpes = ["cpe:2.3:a:oracle:jre:1.8.0:update392:*:*:*:*:*:*:*"]
id = "jre"
name = "BellSoft Liberica JRE"
purl = "pkg:generic/bellsoft-jre@8.0.382?arch=amd64"
sha256 = "1f5999e4d7b1ebd2abcfd4db8df149f70c33877c5f8417e7d01dea00a554bb22"
source = "https://github.com/bell-sw/Liberica/releases/download/8u392+9/bellsoft-jdk8u392+9-src.tar.gz"
source-sha256 = "d0be2e70be6ffb58aa8a53577fdb1b9d9e67e16bb3d83feee5687395643c0d1b"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "https://github.com/bell-sw/Liberica/releases/download/8u392+9/bellsoft-jre8u392+9-linux-amd64.tar.gz"
version = "8.0.392"
[[metadata.dependencies.licenses]]
type = "GPL-2.0 WITH Classpath-exception-2.0"
uri = "https://openjdk.java.net/legal/gplv2+ce.html"
[[metadata.dependencies]]
cpes = ["cpe:2.3:a:oracle:jdk:11.0.21:*:*:*:*:*:*:*"]
id = "jdk"
name = "BellSoft Liberica JDK"
purl = "pkg:generic/bellsoft-jdk@11.0.21?arch=amd64"
sha256 = "752113c1d7b20985b5a090e1ec1fb68204ad02b1061f21c3ad5e9a87a1fa40d2"
source = "https://github.com/bell-sw/Liberica/releases/download/11.0.21+10/bellsoft-jdk11.0.21+10-src.tar.gz"
source-sha256 = "3f2f998725868c22f3f474710759d462a4e8c78183e7c01359ad0cff314fc74e"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "https://github.com/bell-sw/Liberica/releases/download/11.0.21+10/bellsoft-jdk11.0.21+10-linux-amd64.tar.gz"
version = "11.0.21"
[[metadata.dependencies.licenses]]
type = "GPL-2.0 WITH Classpath-exception-2.0"
uri = "https://openjdk.java.net/legal/gplv2+ce.html"
[[metadata.dependencies]]
cpes = ["cpe:2.3:a:oracle:jre:11.0.21:*:*:*:*:*:*:*"]
id = "jre"
name = "BellSoft Liberica JRE"
purl = "pkg:generic/bellsoft-jre@11.0.21?arch=amd64"
sha256 = "2e4144e510585642fab1133e1e888de4ab0ea4870dba895cac13762be65a5b26"
source = "https://github.com/bell-sw/Liberica/releases/download/11.0.21+10/bellsoft-jdk11.0.21+10-src.tar.gz"
source-sha256 = "3f2f998725868c22f3f474710759d462a4e8c78183e7c01359ad0cff314fc74e"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "https://github.com/bell-sw/Liberica/releases/download/11.0.21+10/bellsoft-jre11.0.21+10-linux-amd64.tar.gz"
version = "11.0.21"
[[metadata.dependencies.licenses]]
type = "GPL-2.0 WITH Classpath-exception-2.0"
uri = "https://openjdk.java.net/legal/gplv2+ce.html"
[[metadata.dependencies]]
cpes = ["cpe:2.3:a:oracle:graalvm:22.1.0:*:*:*:community:*:*:*", "cpe:2.3:a:oracle:jdk:11.0.21:*:*:*:*:*:*:*"]
id = "native-image-svm"
name = "BellSoft Liberica NIK"
purl = "pkg:generic/bellsoft-nik@22.3.4?arch=amd64"
sha256 = "dd5e8c835b599a617c985cbf9a57f967df40b13af2fce4ddae387699a5f530df"
source = "https://download.bell-sw.com/vm/22.3.4/bellsoft-liberica-vm-openjdk11.0.21+10-22.3.4+1-src.tar.gz"
source-sha256 = "1b01512621790dd0fdb85c99a7af6bb438381bc260feb9a53d28fceffe74b1b3"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "https://download.bell-sw.com/vm/22.3.4/bellsoft-liberica-vm-core-openjdk11.0.21+10-22.3.4+1-linux-amd64.tar.gz"
version = "11.0.21"
[[metadata.dependencies.licenses]]
type = "GPL-2.0 WITH Classpath-exception-2.0"
uri = "https://openjdk.java.net/legal/gplv2+ce.html"
[[metadata.dependencies]]
cpes = ["cpe:2.3:a:oracle:jdk:17.0.9:*:*:*:*:*:*:*"]
id = "jdk"
name = "BellSoft Liberica JDK"
purl = "pkg:generic/bellsoft-jdk@17.0.9?arch=amd64"
sha256 = "9d7f3fafa3cab04fd14ef42393291b2b4dda9a11e064949f3ffcc55fb832fe19"
source = "https://github.com/bell-sw/Liberica/releases/download/17.0.9+11/bellsoft-jdk17.0.9+11-src.tar.gz"
source-sha256 = "3bf0ba5c38c65270ad41d5c0ebba40bf396d9542e3cc40dce2085f5ef608e9b3"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "https://github.com/bell-sw/Liberica/releases/download/17.0.9+11/bellsoft-jdk17.0.9+11-linux-amd64.tar.gz"
version = "17.0.9"
[[metadata.dependencies.licenses]]
type = "GPL-2.0 WITH Classpath-exception-2.0"
uri = "https://openjdk.java.net/legal/gplv2+ce.html"
[[metadata.dependencies]]
cpes = ["cpe:2.3:a:oracle:jre:17.0.9:*:*:*:*:*:*:*"]
id = "jre"
name = "BellSoft Liberica JRE"
purl = "pkg:generic/bellsoft-jre@17.0.9?arch=amd64"
sha256 = "8129150fa39f1fdf6fdef6b05cf74ff570dae35bf540d2bdd9bf915532e12d55"
source = "https://github.com/bell-sw/Liberica/releases/download/17.0.9+11/bellsoft-jdk17.0.9+11-src.tar.gz"
source-sha256 = "3bf0ba5c38c65270ad41d5c0ebba40bf396d9542e3cc40dce2085f5ef608e9b3"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "file:///cnb/buildpacks/paketo-buildpacks_bellsoft-liberica/10.4.3/bellsoft-jre17.0.9+11-linux-amd64.tar.gz"
#uri = "https://github.com/bell-sw/Liberica/releases/download/17.0.9+11/bellsoft-jre17.0.9+11-linux-amd64.tar.gz"
version = "17.0.9"
[[metadata.dependencies.licenses]]
type = "GPL-2.0 WITH Classpath-exception-2.0"
uri = "https://openjdk.java.net/legal/gplv2+ce.html"
[[metadata.dependencies]]
cpes = ["cpe:2.3:a:oracle:graalvm:22.3.0:*:*:*:community:*:*:*", "cpe:2.3:a:oracle:jdk:17.0.9:*:*:*:*:*:*:*"]
id = "native-image-svm"
name = "BellSoft Liberica NIK"
purl = "pkg:generic/bellsoft-nik@23.0.2?arch=amd64"
sha256 = "a7855fe579b12a7c740cc1002c6bd47486c0ecb0ac8213bd04998889772c6b84"
source = "https://download.bell-sw.com/vm/23.0.2/bellsoft-liberica-vm-openjdk17.0.9+11-23.0.2+1-src.tar.gz"
source-sha256 = "645e035462258b6362a71c2760edae123b30b38ecfd2b85a9cff87354bfc9004"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "https://download.bell-sw.com/vm/23.0.2/bellsoft-liberica-vm-core-openjdk17.0.9+11-23.0.2+1-linux-amd64.tar.gz"
version = "17.0.9"
[[metadata.dependencies.licenses]]
type = "GPL-2.0 WITH Classpath-exception-2.0"
uri = "https://openjdk.java.net/legal/gplv2+ce.html"
[[metadata.dependencies]]
cpes = ["cpe:2.3:a:oracle:jdk:21.0.1:*:*:*:*:*:*:*"]
id = "jdk"
name = "BellSoft Liberica JDK"
purl = "pkg:generic/bellsoft-jdk@21.0.1?arch=amd64"
sha256 = "dba21108416b1ec29e4b66e784e0ff3744fb1348547b818225768e076f1f1adf"
source = "https://github.com/bell-sw/Liberica/releases/download/21.0.1+12/bellsoft-jdk21.0.1+12-src.tar.gz"
source-sha256 = "1207ca0dd5e1beb0b9d1e0d7538eae3f070a9568c7478fc51e71f6b80860553c"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "https://github.com/bell-sw/Liberica/releases/download/21.0.1+12/bellsoft-jdk21.0.1+12-linux-amd64.tar.gz"
version = "21.0.1"
[[metadata.dependencies.licenses]]
type = "GPL-2.0 WITH Classpath-exception-2.0"
uri = "https://openjdk.java.net/legal/gplv2+ce.html"
[[metadata.dependencies]]
cpes = ["cpe:2.3:a:oracle:jre:21.0.1:*:*:*:*:*:*:*"]
id = "jre"
name = "BellSoft Liberica JRE"
purl = "pkg:generic/bellsoft-jre@21.0.1?arch=amd64"
sha256 = "c6bc83c5f5d5d83cfb8ce70a51b05b70d8af5c66bc1bdc9fe9530a39837a0aec"
source = "https://github.com/bell-sw/Liberica/releases/download/21.0.1+12/bellsoft-jdk21.0.1+12-src.tar.gz"
source-sha256 = "1207ca0dd5e1beb0b9d1e0d7538eae3f070a9568c7478fc51e71f6b80860553c"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "https://github.com/bell-sw/Liberica/releases/download/21.0.1+12/bellsoft-jre21.0.1+12-linux-amd64.tar.gz"
version = "21.0.1"
[[metadata.dependencies.licenses]]
type = "GPL-2.0 WITH Classpath-exception-2.0"
uri = "https://openjdk.java.net/legal/gplv2+ce.html"
[[metadata.dependencies]]
cpes = ["cpe:2.3:a:oracle:graalvm:22.3.0:*:*:*:community:*:*:*", "cpe:2.3:a:oracle:jdk:21.0.1:*:*:*:*:*:*:*"]
id = "native-image-svm"
name = "BellSoft Liberica NIK"
purl = "pkg:generic/bellsoft-nik@23.1.1?arch=amd64"
sha256 = "ba009a0101048179efb8f639c1cdf2597a8349d294567a8440a295f3e3427a85"
source = "https://download.bell-sw.com/vm/23.1.1/bellsoft-liberica-vm-openjdk21.0.1+12-23.1.1+1-src.tar.gz"
source-sha256 = "f7233c9e51057ba07b26214f848aa6da4052ad71d16a2eb78b68afaf75154fba"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "https://download.bell-sw.com/vm/23.1.1/bellsoft-liberica-vm-core-openjdk21.0.1+12-23.1.1+1-linux-amd64.tar.gz"
version = "21.0.1"
[[metadata.dependencies.licenses]]
type = "GPL-2.0 WITH Classpath-exception-2.0"
uri = "https://openjdk.java.net/legal/gplv2+ce.html"
[[stacks]]
id = "io.paketo.stacks.tiny"
[[stacks]]
id = "io.buildpacks.stacks.bionic"
[[stacks]]
id = "*"

View File

@ -1,98 +0,0 @@
# Copyright 2018-2020 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
api = "0.7"
[buildpack]
description = "A Cloud Native Buildpack that contributes Spring Boot dependency information and slices an application into multiple layers"
homepage = "https://github.com/paketo-buildpacks/spring-boot"
id = "paketo-buildpacks/spring-boot"
keywords = ["java", "spring", "spring-boot"]
name = "Paketo Buildpack for Spring Boot"
sbom-formats = ["application/vnd.cyclonedx+json", "application/vnd.syft+json"]
version = "5.27.6"
[[buildpack.licenses]]
type = "Apache-2.0"
uri = "https://github.com/paketo-buildpacks/spring-boot/blob/main/LICENSE"
[metadata]
include-files = ["LICENSE", "NOTICE", "README.md", "bin/build", "bin/detect", "bin/helper", "bin/main", "buildpack.toml", "spring-generations.toml"]
pre-package = "scripts/build.sh"
[[metadata.configurations]]
build = true
default = "false"
description = "whether to contribute Spring Boot cloud bindings support"
name = "BP_SPRING_CLOUD_BINDINGS_DISABLED"
[[metadata.configurations]]
default = "true"
description = "Deprecated - whether to auto-configure Spring Boot environment properties from bindings"
launch = true
name = "BPL_SPRING_CLOUD_BINDINGS_ENABLED"
[[metadata.configurations]]
default = "false"
description = "whether to auto-configure Spring Boot environment properties from bindings"
launch = true
name = "BPL_SPRING_CLOUD_BINDINGS_DISABLED"
[[metadata.configurations]]
build = true
default = "1"
description = "default version of Spring Cloud Bindings library to contribute"
name = "BP_SPRING_CLOUD_BINDINGS_VERSION"
[[metadata.dependencies]]
cpes = ["cpe:2.3:a:vmware:spring_cloud_bindings:1.13.0:*:*:*:*:*:*:*"]
id = "spring-cloud-bindings"
name = "Spring Cloud Bindings"
purl = "pkg:generic/springframework/spring-cloud-bindings@1.13.0"
sha256 = "70a448cd45d1dbc117770f934961cd9577c0c4404d34986824f8f593cae4aada"
source = "https://repo1.maven.org/maven2/org/springframework/cloud/spring-cloud-bindings/1.13.0/spring-cloud-bindings-1.13.0-sources.jar"
source-sha256 = "c3f4d0678682fee85d22109fd8257948811956bac095d6eca6b9d5c2cd97690f"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "https://repo1.maven.org/maven2/org/springframework/cloud/spring-cloud-bindings/1.13.0/spring-cloud-bindings-1.13.0.jar"
version = "1.13.0"
[[metadata.dependencies.licenses]]
type = "Apache-2.0"
uri = "https://github.com/spring-cloud/spring-cloud-bindings/blob/main/LICENSE"
[[metadata.dependencies]]
cpes = ["cpe:2.3:a:vmware:spring_cloud_bindings:2.0.0:*:*:*:*:*:*:*"]
id = "spring-cloud-bindings"
name = "Spring Cloud Bindings"
purl = "pkg:generic/springframework/spring-cloud-bindings@2.0.0"
sha256 = "dab47967bffb29c5b4c41653e9741b6ca15cde483926d7f9d0a04956247fb680"
source = "https://repo1.maven.org/maven2/org/springframework/cloud/spring-cloud-bindings/2.0.2/spring-cloud-bindings-2.0.2-sources.jar"
source-sha256 = "b0cb3c4752cc616783f4a58ed78f9464bebaf2a32d625c70adb40c3e29659d28"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "file:///cnb/buildpacks/paketo-buildpacks_spring-boot/5.27.6/spring-cloud-bindings-2.0.2.jar"
#uri = "https://repo1.maven.org/maven2/org/springframework/cloud/spring-cloud-bindings/2.0.2/spring-cloud-bindings-2.0.2.jar"
version = "2.0.2"
[[metadata.dependencies.licenses]]
type = "Apache-2.0"
uri = "https://github.com/spring-cloud/spring-cloud-bindings/blob/main/LICENSE"
[[stacks]]
id = "io.buildpacks.stacks.bionic"
[[stacks]]
id = "io.paketo.stacks.tiny"
[[stacks]]
id = "*"

View File

@ -1,58 +0,0 @@
# Copyright 2018-2021 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
api = "0.7"
[buildpack]
description = "A Cloud Native Buildpack that contributes the Syft CLI which can be used to generate SBoM information"
homepage = "https://github.com/paketo-buildpacks/syft"
id = "paketo-buildpacks/syft"
keywords = ["bom", "sbom", "bill of materials", "syft"]
name = "Paketo Buildpack for Syft"
sbom-formats = ["application/vnd.cyclonedx+json", "application/vnd.syft+json"]
version = "1.41.0"
[[buildpack.licenses]]
type = "Apache-2.0"
uri = "https://github.com/paketo-buildpacks/syft/blob/main/LICENSE"
[metadata]
include-files = ["LICENSE", "NOTICE", "README.md", "bin/build", "bin/detect", "bin/main", "buildpack.toml"]
pre-package = "scripts/build.sh"
[[metadata.dependencies]]
cpes = ["cpe:2.3:a:anchore:syft:0.98.0:*:*:*:*:*:*:*"]
id = "syft"
name = "Syft"
purl = "pkg:generic/anchore-syft@0.98.0"
sha256 = "2340210ba861481f269fcebf910cb4ea888d6ffc44a93758db227d6f1e555977"
source = "https://github.com/anchore/syft/archive/refs/tags/v0.98.0.tar.gz"
source-sha256 = "11962d7df9c5f2a6a8dc2839ff5651f4d9a69be90862fec4d0b947f6378ee5cf"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "file:///cnb/buildpacks/paketo-buildpacks_syft/1.41.0/syft_0.98.0_linux_amd64.tar.gz"
#uri = "https://github.com/anchore/syft/releases/download/v0.98.0/syft_0.98.0_linux_amd64.tar.gz"
version = "0.98.0"
[[metadata.dependencies.licenses]]
type = "Apache-2.0"
uri = "https://github.com/anchore/syft/blob/main/LICENSE"
[[stacks]]
id = "io.buildpacks.stacks.bionic"
[[stacks]]
id = "io.paketo.stacks.tiny"
[[stacks]]
id = "*"

View File

@ -1,17 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
namespace: ${NAMESPACE}
name: ${MODULE_NAME}-configmap
data:
application.properties: |-
##-----------------------------------------------------------------------------------------------------------------------
# apollo
app.id=middleware-agent
apollo.bootstrap.enabled=true
apollo.bootstrap.eagerLoad.enabled=true
apollo.accesskey.secret=e28b04714868414c99470d55edcc452c
# apollo meta env, value: DEV FAT PRO
apollo.gzs-config-env=DEV
##-----------------------------------------------------------------------------------------------------------------------

View File

@ -1,106 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ${MODULE_NAME}-deployment
namespace: ${NAMESPACE}
spec:
replicas: 1
revisionHistoryLimit: 5
selector:
matchLabels:
app: ${MODULE_NAME}-deployment
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
name: ${MODULE_NAME}-deployment
labels:
app: ${MODULE_NAME}-deployment
spec:
restartPolicy: Always
containers:
- name: ${MODULE_NAME}-deployment
image: ${IMAGE}
imagePullPolicy: Always
env:
- name: JAVA_TOOL_OPTIONS
value: '-XX:InitialRAMPercentage=70.0 -XX:MaxRAMPercentage=70.0 -XX:MinRAMPercentage=70.0'
resources:
limits:
cpu: "1"
memory: 1Gi
requests:
cpu: 100m
memory: 100Mi
readinessProbe:
httpGet:
port: 22222
path: /actuator/health/readiness
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
livenessProbe:
httpGet:
port: 22222
path: /actuator/health/liveness
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 10
failureThreshold: 3
volumeMounts:
- name: web-configmap
mountPath: /workspace/config
- name: app-log-volume
mountPath: /workspace/logs
volumes:
- name: web-configmap
configMap:
name: ${MODULE_NAME}-configmap
# - name: app-log-volume
# persistentVolumeClaim:
# claimName: gzs-volume-claim
- emptyDir: {}
name: app-log-volume
# - emptyDir:
# medium: Memory
# sizeLimit: 120Mi
# name: app-log-volume
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ${MODULE_NAME}-ingress
namespace: ${NAMESPACE}
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/proxy-body-size: 100m
spec:
rules:
- host: ${MODULE_NAME}.${NAMESPACE}.komect.com
http:
paths:
- backend:
serviceName: ${MODULE_NAME}-service
servicePort: 80
path: /mw/agent
---
apiVersion: v1
kind: Service
metadata:
name: ${MODULE_NAME}-service
namespace: ${NAMESPACE}
spec:
selector:
app: ${MODULE_NAME}-deployment
ports:
- name: ${MODULE_NAME}-port
port: 80
targetPort: 18080
type: ClusterIP

View File

@ -1,12 +0,0 @@
echo "--------------------------------------设置 jdk"
export JAVA_HOME=/nasdata/jenkins/tools/jdk-21.0.2
export PATH=${JAVA_HOME}/bin:${PATH}
export M2_HOME=/nasdata/jenkins/tools/apache-maven-3.6.3
export PATH=${M2_HOME}:/bin:${PATH}
echo "--------------------------------------项目基本配置"
MODULE_NAME=middleware-agent
MODULE_GIT_PATH=http://cmaqb:${cmaqb}@git.komect.net/QDXWL/${MODULE_NAME}.git
echo "--------------------------------------下载代码"
rm -rf ${WORKSPACE}/* && mkdir -p ${WORKSPACE}/project && cd ${WORKSPACE}/project && git clone -b "${branch}" "${MODULE_GIT_PATH}" .
sh k8s/autodeploy.sh

View File

@ -1,57 +0,0 @@
apiVersion: v1
kind: Config
clusters:
- name: "aqbdev"
cluster:
server: "https://devrancher.komect.net/k8s/clusters/c-hcdsq"
certificate-authority-data: "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZ0VENDQ\
TUyZ0F3SUJBZ0lKQUs5WURrT2ZBUmpBTUEwR0NTcUdTSWIzRFFFQkRRVUFNSEV4Q3pBSkJnTlYKQ\
kFZVEFrTk9NUkV3RHdZRFZRUUlEQWhhYUdWcWFXRnVaekVSTUE4R0ExVUVCd3dJU0dGdVoxcG9iM\
1V4RHpBTgpCZ05WQkFvTUJtdHZiV1ZqZERFTE1Ba0dBMVVFQ3d3Q1NWUXhIakFjQmdOVkJBTU1GV\
1JsZG5KaGJtTm9aWEl1CmEyOXRaV04wTG01bGREQWVGdzB5TkRFeE1qQXdNakl6TlRCYUZ3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
WhxdmcvQjR4S3pmWlRzWmJVQWNJUzErVTdzOEJBY3g1OEQremc5cW9Wdk0KcXplVlFCWnE0c1NlT\
VdRcDhtYzNtV29ReE9ZWlVNd0NoSDd2WHJJN0FmUWNCSTFHaXhGT09UTnRJVk1Na2lETApEVVhJZ\
FBRVmJ4ZGRqZy9BZkZDUkpuakE2Q29zdmpWcThqZmYyNnV3VnJnN2F6blBTVW9IRzNNTUw0dUZHc\
Hg5CmFzdHVBT0NkMGh4UE95alFVdnJjMEhwSHNzdnV6NXliV2c9PQotLS0tLUVORCBDRVJUSUZJQ\
0FURS0tLS0t"
users:
- name: "aqbdev"
user:
token: "kubeconfig-u-tmcmzjb32l:m4wzg2mjzg8nbjpswnknhwcztmldljzb9khcsbns8chksmhkdnn29p"
contexts:
- name: "aqbdev"
context:
user: "aqbdev"
cluster: "aqbdev"
current-context: "aqbdev"

View File

@ -1,32 +0,0 @@
#apiVersion: v1
#kind: PersistentVolume
#metadata:
# name: gzs-volume
#spec:
# accessModes:
# - ReadWriteOnce
# - ReadOnlyMany
# - ReadWriteMany
# capacity:
# storage: 20Gi
# nfs:
# path: /apprun/kubelog
# server: 172.21.48.168
#
#---
#apiVersion: v1
#kind: PersistentVolumeClaim
#metadata:
# name: gzs-volume-claim
# namespace: gzs-common
#spec:
# accessModes:
# - ReadWriteOnce
# - ReadOnlyMany
# - ReadWriteMany
# resources:
# requests:
# storage: 20Gi
# storageClassName: ""
# volumeName: gzs-volume
# volumeMode: Filesystem

93
pom.xml
View File

@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.4</version>
<version>3.4.5</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.cmcc</groupId>
@ -30,7 +30,12 @@
<revision>1.0.0</revision>
<java.version>17</java.version>
<drools.version>9.44.0.Final</drools.version>
<gzs-common.version>0.1.7-SNAPSHOT</gzs-common.version>
<gzs-common.version>0.21.7-SNAPSHOT</gzs-common.version>
<sonar.projectKey>cmhi_middleware</sonar.projectKey>
<sonar.projectName>middleware-agent</sonar.projectName>
<sonar.moduleKey>${project.artifactId}</sonar.moduleKey>
<sonar.qualitygate.wait>true</sonar.qualitygate.wait>
</properties>
<dependencyManagement>
@ -543,92 +548,8 @@
</exclude>
</excludes>
<excludeDevtools>false</excludeDevtools>
<image>
<!--要使用的构建器映像的名称。默认paketobuildpacks/builder:base-->
<builder>
hub.komect.com:10443/abstract/paketobuildpacks_builder-jammy-base:0.4.257
</builder>
<!-- 运行时 Image -->
<runImage>
hub.komect.com:10443/abstract/paketobuildpacks_run-jammy-full:0.1.0
</runImage>
<!--映像生成的映像的名称。-->
<!--suppress UnresolvedMavenProperty -->
<!-- <name>-->
<!-- registry.cn-hangzhou.aliyuncs.com/shishaodong/${project.artifactId}:${project.version}-${git.commit.id.abbrev}-->
<!-- </name>-->
<name>
hub.komect.com:10443/${HUB_PROJECT}/${project.artifactId}:${revision}-${git.commit.id.abbrev}
</name>
<!-- 打出来额外的 tag -->
<tags>
<!--suppress UnresolvedMavenProperty -->
<!-- <tag>-->
<!-- hub.komect.com:10443/${HUB_PROJECT}/${project.parent.artifactId}:${project.parent.version}-${git.commit.id.abbrev}-RELEASE-->
<!-- </tag>-->
</tags>
<env>
<BP_JVM_VERSION>${java.version}</BP_JVM_VERSION>
<BPE_OVERRIDE_LANG>en_US.UTF-8</BPE_OVERRIDE_LANG>
<BPE_OVERRIDE_LC_ALL>en_US.UTF-8</BPE_OVERRIDE_LC_ALL>
<BPE_OVERRIDE_TZ>Asia/Shanghai</BPE_OVERRIDE_TZ>
<BPL_JVM_THREAD_COUNT>100</BPL_JVM_THREAD_COUNT>
</env>
<!-- 拉取镜像的策略可选的值ALWAYS, NEVER, IF_NOT_PRESENT。默认 ALWAYS-->
<pullPolicy>IF_NOT_PRESENT</pullPolicy>
<!--是否需要在建立缓存前清理缓存。默认false-->
<cleanCache>false</cleanCache>
<!-- 启用构造器操作的详细日志记录。默认false-->
<verboseLogging>true</verboseLogging>
<!-- 执行完build 自动push。默认 false -->
<publish>false</publish>
<!-- mvn clean spring-boot:build-image -Dproject.path=/绝对路径/spring-boot-examples -f pom.xml -->
<bindings>
<binding>
${project.basedir}/k8s/buildpack/bellsoft-liberica/10_4_3/buildpack.toml:/cnb/buildpacks/paketo-buildpacks_bellsoft-liberica/10.4.3/buildpack.toml
</binding>
<binding>
${project.basedir}/k8s/buildpack/spring-boot/5_27_6/buildpack.toml:/cnb/buildpacks/paketo-buildpacks_spring-boot/5.27.6/buildpack.toml
</binding>
<binding>
${project.basedir}/k8s/buildpack/syft/1_41_0/buildpack.toml:/cnb/buildpacks/paketo-buildpacks_syft/1.41.0/buildpack.toml
</binding>
<binding>
${project.basedir}/k8s/buildpack/bellsoft-liberica/10_4_3/bellsoft-jre17.0.9+11-linux-amd64.tar.gz:/cnb/buildpacks/paketo-buildpacks_bellsoft-liberica/10.4.3/bellsoft-jre17.0.9+11-linux-amd64.tar.gz
</binding>
<binding>
${project.basedir}/k8s/buildpack/spring-boot/5_27_6/spring-cloud-bindings-2.0.2.jar:/cnb/buildpacks/paketo-buildpacks_spring-boot/5.27.6/spring-cloud-bindings-2.0.2.jar
</binding>
<binding>
${project.basedir}/k8s/buildpack/syft/1_41_0/syft_0.98.0_linux_amd64.tar.gz:/cnb/buildpacks/paketo-buildpacks_syft/1.41.0/syft_0.98.0_linux_amd64.tar.gz
</binding>
</bindings>
</image>
<docker>
<tlsVerify>false</tlsVerify>
</docker>
</configuration>
</plugin>
<plugin>
<groupId>com.ly.smart-doc</groupId>
<artifactId>smart-doc-maven-plugin</artifactId>
<configuration>
<!--指定生成文档的使用的配置文件,配置文件放在自己的项目中-->
<configFile>./src/main/resources/smart-doc.json</configFile>
<!--指定项目名称-->
<projectName>middleware-agent</projectName>
<!--smart-doc实现自动分析依赖树加载第三方依赖的源码如果一些框架依赖库加载不到导致报错这时请使用excludes排除掉-->
</configuration>
<executions>
<execution>
<!--如果不需要在执行编译时启动smart-doc则将phase注释掉-->
<goals>
<goal>html</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>