Is there a less ugly way to tag all docker images ...
# general
w
Is there a less ugly way to tag all docker images of a specific image repo with environment variables than putting this in the config file?
Copy code
registries = """{
    'platform': {
        'address': "%(env.REGISTRY)s",
        'extra_image_tags': ["%(env.RESOLVED_PLATFORM_VERSION)s", "%(env.COMMIT)s"],
        'default': 'true',
    },
}"""
It doesnt seem like the other environment variable defaults suggested in https://www.pantsbuild.org/docs/tagging-docker-images works for the nested "registries" dictionary
h
Hmm, is the interpolation not happening, or is the env var not populated (so an empty string is interpolated)?
w
The former, eg:
Copy code
[docker.registries.local]
address = "<http://amramedical.com|amramedical.com>"
default = true
skip_push = true
extra_image_tags = ["%(env.RESOLVED_PLATFORM_VERSION)s"]
Will give the literal value
%(env.RESOLVED_PLATFORM_VERSION)s
as a tag
Also applies to
address
btw, so hence why I guessed the problem is the nesting of toml tables
I havent tested the "dictionary" like form of .toml tbf (
{ address = "%(env.BLARB)s" }
)
h
Hmm, I think this is a bug and we would expect this to work. Let me dig
w
Awesome!