fix: stream logs without hitting git.coopcloud.tech

Medium-sized options refactor in here too!

See coop-cloud/organising#292.
This commit is contained in:
2023-02-13 16:40:30 +01:00
parent ff58646cfc
commit e4b4084dfd
20 changed files with 139 additions and 49 deletions

View File

@ -15,6 +15,7 @@ import (
"coopcloud.tech/abra/pkg/git"
"coopcloud.tech/abra/pkg/lint"
"coopcloud.tech/abra/pkg/recipe"
"coopcloud.tech/abra/pkg/runtime"
"coopcloud.tech/abra/pkg/upstream/stack"
"github.com/AlecAivazis/survey/v2"
"github.com/sirupsen/logrus"
@ -24,6 +25,7 @@ import (
// DeployAction is the main command-line action for this package
func DeployAction(c *cli.Context) error {
app := ValidateApp(c)
conf := runtime.New()
cl, err := client.New(app.Server)
if err != nil {
@ -36,7 +38,7 @@ func DeployAction(c *cli.Context) error {
}
}
r, err := recipe.Get(app.Recipe)
r, err := recipe.Get(app.Recipe, conf)
if err != nil {
logrus.Fatal(err)
}
@ -83,7 +85,7 @@ func DeployAction(c *cli.Context) error {
}
version = formatter.SmallSHA(head.String())
logrus.Warn("no versions detected, using latest commit")
if err := recipe.EnsureLatest(app.Recipe); err != nil {
if err := recipe.EnsureLatest(app.Recipe, conf); err != nil {
logrus.Fatal(err)
}
}