diff options
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; + } + } |