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= diff --git a/pkg/hal/cli/component/push.go b/pkg/hal/cli/component/push.go index 6892bbb..b1fd4e7 100644 --- a/pkg/hal/cli/component/push.go +++ b/pkg/hal/cli/component/push.go @@ -152,7 +152,13 @@ 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 { + // 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 + } + + // 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 } }