Closed alambike closed 1 month ago
Also, overwrite the default registry repository
, by flavor, can be useful for some situation (p.ex monorepos publishing to Dockerhub => publish multiple different docker images from the same GitHub repository ).
But the biggest drawback with this would be to see how to prevent a GH repo from publishing images to the same image repository than other different project in the organization, at the same coordinates.
In any case, it seems like a smaller and easily detectable problem than the one caused by not being able to configure this parameter.
Motivation
Since we have an
extra_registries
key to indicate extra registries to build, in addition to the default organization's registries, we want to add a new parameter to the configuration file that allows overwriting the publishing registry in each flavor (if not established, by default it will go to the default of the org, according to theimage_type
:DOCKER_REGISTRY_RELEASES
orDOCKER_REGISTRY_SNAPSHOTS
)Given this parameter, a flavor that has extra-registries must be published both in the configured
registry
(or default) and in allextra_registries
.In resume, we will add a
registry
block to each flavor's config section, with the following fields and their corresponding default values:name
: Registry where the image will be published. Default to the corresponding org registry according to theimage_type
(DOCKER_REGISTRY_RELEASES
orDOCKER_REGISTRY_SNAPSHOTS
)repository
: The image repo where the image will be placed in the registry. Default to the corresponding path defined in the GitHub org varDOCKER_REGISTRIES_BASE_PATHS
according to theimage_type
(releases | snapshots) and the type of image to build (services, charts, bases).auth_strategy
: Authentication strategy to use when login to this registry. Defaults to the same value as the default registries