@@ -247,6 +247,7 @@ func getTag(defaultTag string, fixTag string) string {
247247}
248248
249249func fetchDirectory (rservice * common.GitRepoService , owner string , repoName string , path string , ref string ) []* common.RepositoryContent {
250+ log .Printf ("fetch dir %s from %s/%s at rev:%s" , path , owner , repoName , ref )
250251 fileContent , monitorDirectory , err := rservice .GetContents (owner , repoName , path , & common.RepositoryContentGetOptions {
251252 Ref : ref ,
252253 })
@@ -310,11 +311,15 @@ func ProcessRules(rules []*common.RepositoryContent, service *common.GitRepoServ
310311 }).Peek (func (t streamtypes.T ) {
311312 content := t .(string )
312313 // ansible
314+ log .Printf ("write file: %s in folder: %s" , name , ansibleRuleDir )
313315 common .WriteFile (ansibleRuleDir , name , content )
314316 }).ForEach (func (t streamtypes.T ) {
315317 content := t .(string )
316318 // operatotr
317- operator .WriteRule (content , name , operatorRuleDir , operatorReplaceExpr )
319+ log .Printf ("write file: %s in folder: %s" , name , operatorRuleDir )
320+ if err := operator .WriteRule (content , name , operatorRuleDir , operatorReplaceExpr ); err != nil {
321+ log .Fatal (errors .Wrap (err , "failed to write rule" ))
322+ }
318323 })
319324}
320325
0 commit comments