I'm trying to figure out how to do such use case with config server: Each app has its own repository (I named apps sharka, sharkb...) this is easy with pattern for repositories but.. applications are also using external components that have its own configuration I named it ComponentA, ComponentB... So the question is - how to load more then one configuration (for example sharka+ComponentB).

spring:
  profiles:
   active: git
  cloud:
    config:
      server:
        git:
          uri: https://xxx/scm/arch/poc_configserver_teama.git
          repos:
            ComponentA:
              pattern: 'ComponentA'
              uri: https://xxx/scm/arch/poc_configserver_componentA.git
            ComponentB:
              pattern: 'ComponentB'
              uri: https://xxx/scm/arch/poc_configserver_componentB.git
            sharka:
              pattern: sharka
              uri: https://xxx.com/scm/arch/poc_configserver_teama.git
            sharkb:
              pattern: sharkb
              uri: https://xxx.com/scm/arch/poc_configserver_teamb.git

I tried pattern matching to match more then one result (I tried component as other profile '*/ComponentA') but it stops after first finding so this was dead end.

I also tried composite but I think it is not working with multi repo. There is no docs for this and this pseudo code is not working

spring:
  profiles:
   active: composite, git
  cloud:
    config:
      server:
        git:
          uri: https://xxx/scm/arch/poc_configserver_teama.git
          repos:
            sharka:
              pattern: sharka
              composite:
              -
                type: git
                uri: https://xxx/scm/arch/poc_configserver_teama.git
              -
                type: git
                uri: https://xxx/scm/arch/poc_configserver_hostapicache.git
            sharkb:
              pattern: sharkb
              uri: https://xxx/scm/arch/poc_configserver_teamb.git

Is there any working solution for this?

Comment From: ryanjbaxter

A composite configuration is the way to go, but your composite configuration isn't right, here is an example from our docs.

spring:
  profiles:
    active: composite
  cloud:
    config:
      server:
        composite:
        -
          type: svn
          uri: file:///path/to/svn/repo
        -
          type: git
          uri: file:///path/to/rex/git/repo
        -
          type: git
          uri: file:///path/to/walter/git/repo

Comment From: dominikjeske

My idea was to combine 'Pattern Matching and Multiple Repositories' with 'Composite' to have groups of repositories for each pattern (separate composites) but it looks impossible. What you are suggesting is to merge all repositories using one composite? What if I will have 100 repositories in composite? What about performance of such huge group? Can I use search-paths in that scenario?

Comment From: ryanjbaxter

Have you tried something like this?

spring:
  profiles:
    active: composite
  cloud:
    config:
      server:
        composite:
        -
          type: git
          uri: fhttps://xxx/scm/arch/poc_configserver_teama.git
        -
          type: git
          pattern: 'ComponentA'
          uri: https://xxx/scm/arch/poc_configserver_componentA.git
        -
          type: git
          pattern: 'ComponentB'
          uri: https://xxx/scm/arch/poc_configserver_componentB.git
        -
          type: git
          pattern: sharka
          uri: https://xxx.com/scm/arch/poc_configserver_teama.git
        -
          type: git
          pattern: sharkb
          uri: https://xxx.com/scm/arch/poc_configserver_teamb.git

Comment From: dominikjeske

Pattern for composite is ignored - all sources are used. But search-paths is working so I think this is the only way for me. thanks for support

Comment From: ryanjbaxter

Does search paths satisfy your requirements then?

Comment From: dominikjeske

I think I will not find nothing better for now. Thanks.