From fd0676a989ff37f47a0be583f0c0ee4ad94e8e57 Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Wed, 9 Oct 2019 22:51:38 +0200 Subject: [PATCH 1/3] chore: go mod tidy --- go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.sum b/go.sum index c29f672..afe9176 100644 --- a/go.sum +++ b/go.sum @@ -297,8 +297,6 @@ gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -halkyon.io/api v1.0.0-beta.5 h1:hpmy6fK8uQSEkSf7/L3SAyjJXUoZ3ywXL5eukwrXPXE= -halkyon.io/api v1.0.0-beta.5/go.mod h1:cO9/hBS8zlmn/tcLFyZdbs03TwZHrRyDQSgvYQf9+fM= halkyon.io/api v1.0.0-beta.7 h1:Uo3jMyYzMcM4U/4DbXM5Trky/VD9FpMnKWJMZDxiQcc= halkyon.io/api v1.0.0-beta.7/go.mod h1:cO9/hBS8zlmn/tcLFyZdbs03TwZHrRyDQSgvYQf9+fM= k8s.io/api v0.0.0-20190516230258-a675ac48af67 h1:BKg03K4me3EdM340RB08XB3MRlJ57KY+0f5PfI6wPZY= From b33d7fdb016ab0ad9a33a40f6a6a8cfa785058c2 Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Fri, 11 Oct 2019 12:42:14 +0200 Subject: [PATCH 2/3] fix: stop running app before building a new version --- pkg/hal/cli/component/push.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/hal/cli/component/push.go b/pkg/hal/cli/component/push.go index 6892bbb..840e06c 100644 --- a/pkg/hal/cli/component/push.go +++ b/pkg/hal/cli/component/push.go @@ -152,6 +152,11 @@ func (o *pushOptions) push(component *component.Component) error { return err } + // need to stop running app before building a new version + if err = c.ExecCommand(podName, []string{"/var/lib/supervisord/bin/supervisord", "ctl", "stop", "run"}, ""); err != nil { + return err + } + if err = c.ExecCommand(podName, []string{"/var/lib/supervisord/bin/supervisord", "ctl", "start", "build"}, "Performing build"); err != nil { return err } From 1a6c948a784627431599fc9adb9148588d2ac974 Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Fri, 11 Oct 2019 14:13:42 +0200 Subject: [PATCH 3/3] fix: perform build directly so that we can block until it's finished --- pkg/hal/cli/component/push.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/hal/cli/component/push.go b/pkg/hal/cli/component/push.go index 840e06c..b1fd4e7 100644 --- a/pkg/hal/cli/component/push.go +++ b/pkg/hal/cli/component/push.go @@ -157,7 +157,8 @@ func (o *pushOptions) push(component *component.Component) error { return err } - if err = c.ExecCommand(podName, []string{"/var/lib/supervisord/bin/supervisord", "ctl", "start", "build"}, "Performing build"); err != nil { + // perform build directly to block until it's finished + if err = c.ExecCommand(podName, []string{"/usr/local/bin/build"}, "Performing build"); err != nil { return err } }