dnephin / dobi

A build automation tool for Docker applications
https://dnephin.github.io/dobi/
Apache License 2.0
309 stars 36 forks source link

Variables with default values don't work for image tags #188

Open flcdrg opened 4 years ago

flcdrg commented 4 years ago

Trying to use {env.VERSION:v1.0} (or anything else for the default value) results in an error.

[ERROR] failed to load config from "dobi.yaml": Error at myimage.tags: failed validation: the first tag "v1.0}" may not include an image name

I'm guessing it's trying to validate the tag before the variable is evaluated.

dnephin commented 4 years ago

Thank you for the bug report!

One way to fix this might be to have ValidateTags create a call something like this https://github.com/dnephin/dobi/blob/master/execenv/environment.go#L45-L51 on the tag value, before parsing it, to remove the template.