Skip to content

Commit

Permalink
Fix: implemented the workaround to block the process till the supervi…
Browse files Browse the repository at this point in the history
…sord command doing the build is running. #61
  • Loading branch information
cmoulliard committed Jan 21, 2020
1 parent 9462526 commit 0b9f795
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/hal/cli/component/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ func (o *pushOptions) push(component *component.Component) error {
if err = c.ExecCommand(podName, []string{"/var/lib/supervisord/bin/supervisord", "ctl", "start", "build"}, "Performing build"); err != nil {
return err
}

if err = c.ExecCommand(podName, []string{"bash", "-c", "while /var/lib/supervisord/bin/supervisord ctl status build | grep RUNNING; do sleep 1; done"},
"Waiting for build to finish"); err != nil {
return err
}
}

if err = c.ExecCommand(podName, []string{"/var/lib/supervisord/bin/supervisord", "ctl", "stop", "run"}, ""); err != nil {
Expand Down

0 comments on commit 0b9f795

Please sign in to comment.