Compare commits

...

4 Commits

2 changed files with 30 additions and 4 deletions

View File

@ -33,7 +33,7 @@ steps:
event: tag
- name: release
image: goreleaser/goreleaser:v1.18.2
image: goreleaser/goreleaser:v1.19.2
environment:
GITEA_TOKEN:
from_secret: goreleaser_gitea_token

View File

@ -5,6 +5,8 @@ import (
"fmt"
"io"
"io/ioutil"
"os"
"os/signal"
"strings"
"time"
@ -414,7 +416,7 @@ func deployServices(
return nil
}
logrus.Infof("waiting for services to converge: %s", strings.Join(serviceNames, ", "))
logrus.Infof("Starting to poll for deployment status for: %s", strings.Join(serviceNames, ", "))
ch := make(chan error, len(serviceIDs))
for serviceID, serviceName := range serviceIDs {
logrus.Debugf("waiting on %s to converge", serviceName)
@ -431,7 +433,7 @@ func deployServices(
logrus.Debugf("assuming %s converged successfully", serviceID)
}
logrus.Info("services converged 👌")
logrus.Infof("Successfully deployed %s to %s 👌", appName, namespace.Name())
return nil
}
@ -454,6 +456,10 @@ func WaitOnService(ctx context.Context, cl *dockerClient.Client, serviceID, appN
errChan := make(chan error, 1)
pipeReader, pipeWriter := io.Pipe()
sigintChannel := make(chan os.Signal, 1)
signal.Notify(sigintChannel, os.Interrupt)
defer signal.Stop(sigintChannel)
go func() {
errChan <- progress.ServiceProgress(ctx, cl, serviceID, pipeWriter)
}()
@ -465,6 +471,26 @@ func WaitOnService(ctx context.Context, cl *dockerClient.Client, serviceID, appN
select {
case err := <-errChan:
return err
case <-sigintChannel:
return fmt.Errorf(fmt.Sprintf(`
The wait for %s to converge was interrupted.
This does not necessarily mean your deployment has stopped, but we aren't
monitoring it anymore
You can track latest deployment status with:
abra app ps --watch %s
And inspect the logs with:
abra app logs %s
If a service is failing to even start, try to smoke out the error with:
abra app errors --watch %s
`, appName, appName, appName, appName))
case <-time.After(timeout):
return fmt.Errorf(fmt.Sprintf(`
%s has not converged (%s second timeout reached).
@ -481,7 +507,7 @@ And inspect the logs with:
abra app logs %s
If a service is failing to even start, try smoke out the error with:
If a service is failing to even start, try to smoke out the error with:
abra app errors --watch %s