github.com/buildtool/build-tools@v0.2.29-0.20240322150259-6a1d0a553c23/www/docs/config/files.md (about)

     1  # Configuration files
     2  
     3  The `.buildtools.yaml` file(s) must be present in the project folder or upwards
     4  in the directory structure.
     5  This lets you create a common `.buildtools.yaml` file to be used for a set of projects.
     6  The `.buildtools.yaml` files will then be merged together,
     7  and settings from the file closest to the project being used first.
     8  
     9  ## Example:
    10  
    11  ```sh
    12  $ tree
    13  .
    14  ├── customer1
    15  │ ├── project1
    16  │ └── project2
    17  └── customer2
    18      └── project1
    19  ```
    20  
    21  Here we can choose to put a `.buildtools.yaml` file in the different `customer` directories
    22  since they (most likely) have different deployment configuration.
    23  
    24  But both `project1` and `project2` for `cutomer1` use the same repository, so we can share that.
    25  
    26  ```sh
    27  $ cat .buildtools.yaml
    28  targets:
    29    local:
    30      context: docker-desktop
    31  
    32  $ cat customer1/.buildtools.yaml
    33  registry:
    34    dockerhub:
    35      namespace: buildtool
    36  targets:
    37    prod:
    38      context: production
    39      kubeconfig: ~/.kube/config.d/production.yaml
    40  
    41  $ cat customer1/project1/.buildtools.yaml
    42  targets:
    43    staging:
    44      context: test
    45  
    46  $ cat customer1/project2/.buildtools.yaml
    47  targets:
    48    staging:
    49      context: staging
    50      namespace: project2
    51  
    52  $ cat customer2/project1/.buildtools.yaml
    53  targets:
    54    staging:
    55      context: local
    56      namespace: customer2
    57  ```
    58  
    59  
    60  
    61  TODO Describe the different "final" settings