aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-maven-plugin
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-03-25 21:14:57 +0100
committerJon Marius Venstad <venstad@gmail.com>2020-03-25 21:14:57 +0100
commit552ed92e4345d650334bb4428d21e5e2eccfc252 (patch)
tree2ed07470803cc10122beb44ac44b49b80de5bd46 /vespa-maven-plugin
parent3db1991636a31acaffd2826f671c52960adcc938 (diff)
Fail more intelligibly when endpointCertificateTimeout occurs
Diffstat (limited to 'vespa-maven-plugin')
-rw-r--r--vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeployMojo.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeployMojo.java b/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeployMojo.java
index cc714f38290..a798c2ad6df 100644
--- a/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeployMojo.java
+++ b/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeployMojo.java
@@ -62,15 +62,16 @@ public class DeployMojo extends AbstractVespaDeploymentMojo {
private void tailLogs(ApplicationId id, ZoneId zone, long run) throws MojoFailureException, MojoExecutionException {
DeploymentLog log = controller.followDeploymentUntilDone(id, zone, run, this::print);
switch (log.status()) {
- case success: return;
- case error: throw new MojoExecutionException("Unexpected error during deployment; see log for details");
- case aborted: throw new MojoFailureException("Deployment was aborted, probably by a newer deployment");
- case outOfCapacity: throw new MojoFailureException("No capacity left in zone; please contact the Vespa team");
- case deploymentFailed: throw new MojoFailureException("Deployment failed; see log for details");
- case installationFailed: throw new MojoFailureException("Installation failed; see Vespa log for details");
- case running: throw new MojoFailureException("Deployment not completed");
- case testFailure: throw new IllegalStateException("Unexpected status; tests are not run for manual deployments");
- default: throw new IllegalArgumentException("Unexpected status '" + log.status() + "'");
+ case success: return;
+ case error: throw new MojoExecutionException("Unexpected error during deployment; see log for details");
+ case aborted: throw new MojoFailureException("Deployment was aborted, probably by a newer deployment");
+ case outOfCapacity: throw new MojoFailureException("No capacity left in zone; please contact the Vespa team");
+ case deploymentFailed: throw new MojoFailureException("Deployment failed; see log for details");
+ case installationFailed: throw new MojoFailureException("Installation failed; see Vespa log for details");
+ case running: throw new MojoFailureException("Deployment not completed");
+ case endpointCertificateTimeout: throw new MojoFailureException("Endpoint certificate not ready in time; please contact Vespa team");
+ case testFailure: throw new IllegalStateException("Unexpected status; tests are not run for manual deployments");
+ default: throw new IllegalArgumentException("Unexpected status '" + log.status() + "'");
}
}