diff options
author | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2018-04-12 15:05:37 +0200 |
---|---|---|
committer | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2018-04-13 12:08:10 +0200 |
commit | 7c1ee8beccb08d4f0cd42b74d5a5bab8480e0f25 (patch) | |
tree | 66946a61df58d6d70f6ccf2c10df73d149371084 /controller-api | |
parent | 41969051757a99e5c8ed09fac31fa0658f039c7c (diff) |
Expand BuildSystem interface
Diffstat (limited to 'controller-api')
2 files changed, 11 insertions, 1 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/BuildService.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/BuildService.java index 26ef20bbc51..e32ad47b180 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/BuildService.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/BuildService.java @@ -9,12 +9,17 @@ import java.util.Objects; public interface BuildService { /** - * Enqueue a job defined by buildJob in an external build system, and return the outcome of the enqueue request. + * Enqueues a job defined by buildJob in an external build system, and returns the outcome of the enqueue request. * This method should return false only when a retry is in order, and true otherwise, e.g., on success, or for * invalid jobs. */ boolean trigger(BuildJob buildJob); + /** + * Returns whether the given job is currently running. + */ + boolean isRunning(BuildJob buildJob); + // TODO jvenstad: Implement with DeploymentTrigger.Job class BuildJob { diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockBuildService.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockBuildService.java index 2f6307ae10d..a75236e6f67 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockBuildService.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockBuildService.java @@ -9,4 +9,9 @@ public class MockBuildService implements BuildService { return true; } + @Override + public boolean isRunning(BuildJob buildJob) { + return false; + } + } |