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

     1  # `.buildtools.yaml`
     2  Configuration and setup is done in `.buildtools.yaml` file(s).
     3  A typical configuration file consists of a [`registry`](registry.md) config
     4  and a list of [`targets`](targets.md) to use.
     5  
     6  
     7  |      Key             |                   Description       |
     8  | :------------------- | :---------------------------------- |
     9  | registry  | [registry](registry.md) registry to push to    |
    10  | targets   | [targets](targets.md) to deploy to             |
    11  | git       |  [git](git.md) configuration block             |
    12  | gitops    |  [git repos](gitops.md) to push descriptors to |
    13  
    14  
    15  *Note:* [Multiple](files.md) files can be used for more advanced usage
    16  
    17  ## Example
    18  The following file specifies a Dockerhub registry and 2 deployment targets: `local-test` and `staging`
    19  ```yaml
    20  registry:
    21    dockerhub:
    22      namespace: buildtool
    23  targets:
    24    local-test:
    25      context: docker-desktop
    26    staging:
    27      context: staging-aws-eu-west-1
    28      namespace: my-test
    29  ```
    30  
    31  
    32  ## Configuration file from environment variables
    33  A `.buildtools.yaml` file can be created by defining an environment variable in the build pipeline named `BUILDTOOLS_CONTENT`.
    34  This can be useful when setting up CI/CD pipelines where the file system is not
    35  easily accessible.
    36  
    37  On MacOS the value can be created and copied to the clipboard using the following snippet:
    38  
    39  ```sh
    40  $ cat - <<EOF | base64 -w0 | pbcopy
    41  targets:
    42    local-test:
    43      context: docker-desktop
    44  
    45  EOF
    46  ```
    47  
    48  `BUILDTOOLS_CONTENT` can be either a base64 encoded string or plain text.
    49  
    50  **Note:** If `BUILDTOOLS_CONTENT` is set, no other configuration files will be used.
    51  
    52  See the following sections for information on how to configure the different parts of the configuration files.