Enhancements, see details
- Added a message to explain to the user that it needs to build and push images - The Release Name string is now a constant ins source code, later we will be able to change it to (for example) a template call - SHA256 injected label (from docker-compose file content) is a bit long, SHA1 is shorter - We now add compose command line and generation date in the Values file - Code cleanup, refactorisation and enhancements - More documentation in the source code
This commit is contained in:
@@ -10,6 +10,10 @@ import (
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
const (
|
||||
ICON_EXCLAMATION = "❕"
|
||||
)
|
||||
|
||||
// Parser is a docker-compose parser.
|
||||
type Parser struct {
|
||||
Data *Compose
|
||||
@@ -72,6 +76,18 @@ func NewParser(filename string) *Parser {
|
||||
log.Fatal(strings.Join(missing, "\n"))
|
||||
}
|
||||
|
||||
// check the build element
|
||||
for name, s := range c.Services {
|
||||
if s.RawBuild == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
fmt.Println(ICON_EXCLAMATION +
|
||||
" \x1b[33myou will need to build and push your image named \"" + s.Image + "\"" +
|
||||
" for the \"" + name + "\" service \x1b[0m")
|
||||
|
||||
}
|
||||
|
||||
return p
|
||||
}
|
||||
|
||||
|
@@ -25,4 +25,5 @@ type Service struct {
|
||||
Volumes []string `yaml:"volumes"`
|
||||
Expose []int `yaml:"expose"`
|
||||
EnvFiles []string `yaml:"env_file"`
|
||||
RawBuild interface{} `yaml:"build"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user