From f0c99414787d1ffc574bc6ce9e276a935eab665f Mon Sep 17 00:00:00 2001 From: yovinchen Date: Thu, 25 Jan 2024 14:23:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=8F=90=E4=BA=A4=E5=88=86?= =?UTF-8?q?=E6=94=AF=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 ---- xlcs-parent/service-gateway/Jenkinsfile | 58 --------------------- xlcs-parent/service/service-acl/Jenkinsfile | 39 -------------- 3 files changed, 107 deletions(-) delete mode 100644 xlcs-parent/service-gateway/Jenkinsfile delete mode 100644 xlcs-parent/service/service-acl/Jenkinsfile diff --git a/README.md b/README.md index 289e5e7..b17e1fe 100644 --- a/README.md +++ b/README.md @@ -229,13 +229,3 @@ services: retries: 3 start_period: 60s #⾸次检测延迟时间 ``` - -## K8s 集群部署 - -使用 jenkins 进行打包 - -构建参数 - -![image-20240125141417779](https://lsky.hhdxw.top/imghub/2024/01/image-202401251706163258.png) - -具体 pipeline 参考各模块下文件 diff --git a/xlcs-parent/service-gateway/Jenkinsfile b/xlcs-parent/service-gateway/Jenkinsfile deleted file mode 100644 index 3ddaf7a..0000000 --- a/xlcs-parent/service-gateway/Jenkinsfile +++ /dev/null @@ -1,58 +0,0 @@ -pipeline { - environment { - DOCKER_REGISTRY = "10.211.55.2:8083" - DOCKER_IMAGE_NAME = "service-gateway" - DOCKER_IMAGE_TAG = "${env.DATETIME}" - DOCKER_LOGIN_USERNAME = "admin" - DOCKER_LOGIN_PASSWORD = "adminadmin" - } - agent { - kubernetes { - inheritFrom 'maven' - containerTemplate { - name 'maven' - image 'maven:3.8.4-jdk-8' - } - - } - - } - stages { - stage('拉取代码') { - steps { - checkout([$class: 'GitSCM', branches: [[name: 'devops']], - extensions: [[$class: 'CloneOption', depth: 1, shallow: true]], userRemoteConfigs: [[url: 'http://gitea.hhdxw.top:3000/yovinchen/xlcs.git']] - ]) - } - } - - stage('编译jar包') { - agent none - steps { - container('maven') { - sh 'mvn -f xlcs-parent/pom.xml -B clean package -Dmaven.test.skip=true -Dautoconfig.skip' - } - - } - } - - stage('保存制品') { - steps { - archiveArtifacts(artifacts: 'xlcs-parent/service-gateway/target/*.jar', followSymlinks: false) - } - } - - stage('构建Docker镜像') { - steps { - sh "docker build -t ${DOCKER_REGISTRY}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} xlcs-parent/service-gateway" - } - } - - stage('登录仓库并推送镜像') { - steps { - sh "docker login -u ${DOCKER_LOGIN_USERNAME} -p ${DOCKER_LOGIN_PASSWORD} ${DOCKER_REGISTRY}" - sh "docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}" - } - } - } -} diff --git a/xlcs-parent/service/service-acl/Jenkinsfile b/xlcs-parent/service/service-acl/Jenkinsfile deleted file mode 100644 index e207ea4..0000000 --- a/xlcs-parent/service/service-acl/Jenkinsfile +++ /dev/null @@ -1,39 +0,0 @@ -pipeline { - agent { - kubernetes { - inheritFrom 'maven' - containerTemplate { - name 'maven' - image 'maven:3.8.4-jdk-8' - } - - } - - } - stages { - stage('拉取代码') { - steps { - checkout([$class: 'GitSCM', branches: [[name: 'devops']], - extensions: [[$class: 'CloneOption', depth: 1, shallow: true]], userRemoteConfigs: [[url: 'http://gitea.hhdxw.top:3000/yovinchen/xlcs.git']] - ]) - } - } - - stage('编译jar包') { - agent none - steps { - container('maven') { - sh 'mvn -f xlcs-parent/pom.xml -B clean package -Dmaven.test.skip=true -Dautoconfig.skip' - } - - } - } - - stage('保存制品') { - steps { - archiveArtifacts(artifacts: 'xlcs-parent/service/service-acl/target/service-acl.jar', followSymlinks: false) - } - } - - } -}