Skip to content

Commit

Permalink
feat: 指定模块统一打包插件 TencentBlueKing#8672
Browse files Browse the repository at this point in the history
  • Loading branch information
fcfang123 committed Oct 18, 2023
1 parent 4ae4fc4 commit f268e07
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ tasks.register("multiBootJar") {
isSpecifiedModulePath(it.path, multiModuleList)
}.forEach { subProject -> addDependencies(subProject.path) }
dependsOn("copyToRelease")
dependsOn("bootRun")
//dependsOn("bootRun")
// dependsOn("jib")
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/backend/ci/core/mutijar/boot-mutijar/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ tasks.named<BootJar>("bootJar") {
}

tasks.named<BootRun>("bootRun") {
println("bootRun classpath is :" + classpath.asPath.toString())
//classpath = files("C:\\Users\\bk-ci-2\\src\\backend\\ci\\core\\mutijar\\boot-mutijar\\build\\classes\\kotlin\\main")
dependsOn("multiBootJar")
doFirst {
systemProperty("devops.multi.from", System.getProperty("devops.multi.from"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class DataSourceDefinitionRegistrar : ImportBeanDefinitionRegistrar {

companion object {
private val logger = LoggerFactory.getLogger(DataSourceDefinitionRegistrar::class.java)
private val multiDataSource = listOf("auth", "image", "process")
private val multiDataSource = System.getProperty("devops.multi.from").split(",")
private val regex = Regex("""ENC\((.*?)\)""")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ class JooqDefinitionRegistrar : ImportBeanDefinitionRegistrar {

companion object {
private val logger = LoggerFactory.getLogger(DataSourceDefinitionRegistrar::class.java)
private val multiDataSource = listOf("auth", "image", "process")
private val multiDataSource = System.getProperty("devops.multi.from").split(",")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class MutijarDslContextConfiguration {

companion object {
private val logger = LoggerFactory.getLogger(MutijarDslContextConfiguration::class.java)
private val multiModelService = listOf("auth", "image", "process")
private val multiModelService = System.getProperty("devops.multi.from").split(",")
private val lambdaServiceRegex = "\\.(tsource|ttarget|process|project|store)".toRegex()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ import com.tencent.devops.repository.utils.RepositoryUtils
import org.slf4j.LoggerFactory
import org.springframework.context.ApplicationContext
import org.springframework.context.ApplicationContextAware
import org.springframework.stereotype.Service

@Suppress("ALL")
@Service
abstract class PipelineBuildWebhookService : ApplicationContextAware {

override fun setApplicationContext(applicationContext: ApplicationContext) {
Expand Down Expand Up @@ -265,13 +263,13 @@ abstract class PipelineBuildWebhookService : ApplicationContextAware {
return@outside
}

/*if (pipelinebuildWebhookService.webhookTriggerPipelineBuild(
if (webhookTriggerPipelineBuild(
projectId = projectId,
pipelineId = pipelineId,
codeRepositoryType = codeRepositoryType,
matcher = matcher
)
) return@outside*/
) return@outside
} catch (e: Throwable) {
logger.warn("[$pipelineId]|webhookTriggerPipelineBuild fail: $e", e)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ class SamplePipelineBuildWebhookService : PipelineBuildWebhookService() {
)
}

/* @BkTimed // 要aop生效必须在子类上拦截
@BkTimed // 要aop生效必须在子类上拦截
override fun webhookTriggerPipelineBuild(
projectId: String,
pipelineId: String,
codeRepositoryType: String,
matcher: ScmWebhookMatcher
): Boolean {
return super.webhookTriggerPipelineBuild(projectId, pipelineId, codeRepositoryType, matcher)
}*/
}
}

0 comments on commit f268e07

Please sign in to comment.