Skip to content

Commit

Permalink
Merge pull request #2845 from tejal29/add_deploy_stable_timer
Browse files Browse the repository at this point in the history
add deploy stabilize timer
  • Loading branch information
tejal29 authored Sep 9, 2019
2 parents 16e1b32 + b649818 commit a4c56c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/skaffold/runner/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package runner
import (
"context"
"io"
"time"

"github.com/pkg/errors"

Expand Down Expand Up @@ -47,12 +48,13 @@ func (r *SkaffoldRunner) Deploy(ctx context.Context, out io.Writer, artifacts []
func (r *SkaffoldRunner) performStatusCheck(ctx context.Context, out io.Writer) error {
// Check if we need to perform deploy status
if r.runCtx.Opts.StatusCheck {
start := time.Now()
color.Default.Fprintln(out, "Waiting for deployments to stabilize")
err := statusCheck(ctx, r.defaultLabeller, r.runCtx)
if err != nil {
color.Default.Fprintln(out, err.Error())
return err
}
return err
color.Default.Fprintln(out, "Deployments stabilized in", time.Since(start))
}
return nil
}

0 comments on commit a4c56c1

Please sign in to comment.