Commit cc61a7df authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

command/push: warn for bad builds

parent c9504d50
......@@ -147,6 +147,26 @@ func (c *PushCommand) Run(args []string) int {
uploadOpts.Builds[b.Name] = info
}
// Warn about builds not having post-processors.
var badBuilds []string
for name, b := range uploadOpts.Builds {
if b.Artifact {
continue
}
badBuilds = append(badBuilds, name)
}
if len(badBuilds) > 0 {
c.Ui.Error(fmt.Sprintf(
"Warning! One or more of the builds in this template does not\n" +
"have an Atlas post-processor. Artifacts from this template will\n" +
"not appear in the Atlas artifact registry.\n\n" +
"This is just a warning. Atlas will still build your template\n" +
"and assume other post-processors are sending the artifacts where\n" +
"they need to go.\n\n" +
"Builds: %s\n\n", strings.Join(badBuilds, ", ")))
}
// Create the build config if it doesn't currently exist.
if err := c.create(uploadOpts.Slug, create); err != nil {
c.Ui.Error(err.Error())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment