From cdc46810354ad91adbabe2f7cfede9db572a3d18 Mon Sep 17 00:00:00 2001 From: felixncheng Date: Thu, 18 Jul 2024 10:50:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20boot=E6=8F=92=E4=BB=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=A1=B9=E7=9B=AE=E7=8B=AC=E7=AB=8B=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E6=89=93=E5=8C=85=20#208?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tencent/devops/conventions/SpringCloudConvention.kt | 5 +++++ .../src/main/kotlin/com/tencent/devops/enums/AssemblyMode.kt | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/devops-boot-project/devops-boot-tools/devops-boot-gradle-plugin/src/main/kotlin/com/tencent/devops/conventions/SpringCloudConvention.kt b/devops-boot-project/devops-boot-tools/devops-boot-gradle-plugin/src/main/kotlin/com/tencent/devops/conventions/SpringCloudConvention.kt index 97e01fa..e5c4bdb 100644 --- a/devops-boot-project/devops-boot-tools/devops-boot-gradle-plugin/src/main/kotlin/com/tencent/devops/conventions/SpringCloudConvention.kt +++ b/devops-boot-project/devops-boot-tools/devops-boot-gradle-plugin/src/main/kotlin/com/tencent/devops/conventions/SpringCloudConvention.kt @@ -26,10 +26,15 @@ class SpringCloudConvention { project.dependencies.add(IMPLEMENTATION, CONSUL_CONFIG) project.dependencies.add(IMPLEMENTATION, CONSUL_DISCOVERY) } + AssemblyMode.K8S, AssemblyMode.KUBERNETES -> { project.dependencies.add(IMPLEMENTATION, K8S_CONFIG) project.dependencies.add(IMPLEMENTATION, K8S_DISCOVERY) } + + AssemblyMode.NONE -> { + // 独立部署,不依赖任何微服务环境 + } } } diff --git a/devops-boot-project/devops-boot-tools/devops-boot-gradle-plugin/src/main/kotlin/com/tencent/devops/enums/AssemblyMode.kt b/devops-boot-project/devops-boot-tools/devops-boot-gradle-plugin/src/main/kotlin/com/tencent/devops/enums/AssemblyMode.kt index b12a410..b606ac5 100644 --- a/devops-boot-project/devops-boot-tools/devops-boot-gradle-plugin/src/main/kotlin/com/tencent/devops/enums/AssemblyMode.kt +++ b/devops-boot-project/devops-boot-tools/devops-boot-gradle-plugin/src/main/kotlin/com/tencent/devops/enums/AssemblyMode.kt @@ -1,9 +1,11 @@ package com.tencent.devops.enums enum class AssemblyMode { + NONE, CONSUL, K8S, - KUBERNETES; + KUBERNETES, + ; companion object { fun ofValueOrDefault(value: String): AssemblyMode {