File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed
src/main/groovy/com/cloudogu/gitops Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import ch.qos.logback.core.ConsoleAppender
99import com.cloudogu.gitops.Application
1010import com.cloudogu.gitops.Feature
1111import com.cloudogu.gitops.config.ApplicationConfigurator
12+ import com.cloudogu.gitops.config.CommonFeatureConfig
1213import com.cloudogu.gitops.config.Config
1314import com.cloudogu.gitops.config.schema.JsonSchemaValidator
1415import com.cloudogu.gitops.destroy.Destroyer
@@ -246,11 +247,8 @@ class GitopsPlaygroundCli {
246247 }
247248
248249 static void runHook (Application app , String methodName , def config ) {
249-
250-
251-
252- app. features. each { feature ->
253- // Executing only the method if the derived feature class has implemented the passed specific hook method
250+ ([new CommonFeatureConfig (), * app. features]). each { feature ->
251+ // Executing only the method if the derived feature class has implemented the passed methodName
254252 def mm = feature. metaClass. getMetaMethod(methodName, config)
255253 if (mm && mm. declaringClass. theClass != Feature ) {
256254 log. debug(" Executing ${ methodName} hook on feature ${ feature.class.name} " )
Original file line number Diff line number Diff line change @@ -2,16 +2,12 @@ package com.cloudogu.gitops.config
22
33import com.cloudogu.gitops.Feature
44import groovy.util.logging.Slf4j
5- import io.micronaut.core.annotation.Order
6- import jakarta.inject.Singleton
75
86@Slf4j
9- @Singleton
10- @Order (40 )
117class CommonFeatureConfig extends Feature {
128 @Override
139 void preConfigValidation (Config configToSet ) {
14- log. debug(" Doing common preConfigValidation" )
10+ log. debug(" Common preConfigValidation" )
1511 validateScmmAndJenkinsAreBothSet(configToSet)
1612 validateMirrorReposHelmChartFolderSet(configToSet)
1713 }
You can’t perform that action at this time.
0 commit comments