简体   繁体   中英

need to call two branches with in one git repository

I have a spring client application which is using a cloud server, I have a branch for each environment, for example, client STAG points to STAG branch in http://@giturl.So , what I'm trying to do is creating another branch called common which consists of common properties across the environment. I want to point STAG branch from client application to cloud server and as well as to common branch which retrieves all the common properties used across all the environments, Tried to use the composite type in a cloud server in application.yml by defining the same URL and different labels no luck on that any thoughts?

Tried using the composite type but didn't worked

spring:
  profiles: 
    active: composite
  cloud: 
    config: 
      server:
        composite:         
          - 
            type:
            git:
            uri: https://@gitURI
            searchPaths: '{application}/,common/'
          - 
            type:
            git:
            uri: https://@gitURI
            searchPaths: '{application}/'

Ok, so you might to look at this part of the documentation and play with those 3 properties at the client app, where label would be the branch names in a comma separated string. The searchPaths property at the server's side would be {application} since that is the subfolder.

You might want to consider having multiple config repositories since that will be easier to manage.

Hope that helps! :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM