diff options
author | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2019-06-13 13:52:18 +0200 |
---|---|---|
committer | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2019-06-13 13:52:18 +0200 |
commit | 2bb71582b979a83a39260f3f11466737b94ee47f (patch) | |
tree | ac4d17548ae440348a7ecd62bbd87cfa998c6496 /vespa-maven-plugin/src | |
parent | 7d2366a939f64f964a208e01c4455dd530f833c6 (diff) |
Wrap TestConfig in TestRuntime, which includes and Authenticator, and obtain the former from controller
Diffstat (limited to 'vespa-maven-plugin/src')
-rw-r--r-- | vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeployMojo.java | 7 |
1 files changed, 6 insertions, 1 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 32ff03ae202..d62ccb1bba4 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 @@ -4,6 +4,7 @@ import ai.vespa.hosted.api.Deployment; import ai.vespa.hosted.api.DeploymentLog; import ai.vespa.hosted.api.DeploymentResult; import com.yahoo.config.provision.ApplicationId; +import com.yahoo.config.provision.Environment; import com.yahoo.config.provision.zone.ZoneId; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; @@ -41,7 +42,11 @@ public class DeployMojo extends AbstractVespaMojo { projectPathOf("target", "application.zip")))); if (vespaVersion != null) deployment = deployment.atVersion(vespaVersion); - ZoneId zone = environment == null || region == null ? controller.devZone() : ZoneId.from(environment, region); + ZoneId zone = region == null + ? controller.defaultZone(environment == null + ? Environment.dev + : Environment.from(environment)) + : ZoneId.from(environment, region); DeploymentResult result = controller.deploy(deployment, id, zone); getLog().info(result.message()); |