Add dummy deploymenst for running dev/perf deployments too
@@ -1292,10 +1292,13 @@ public class ApplicationApiHandler extends AuditLoggingRequestHandler {
request.getUri()).toString());
}
}
- // Add dummy values for not-yet-existent prod deployments.
- status.jobSteps().keySet().stream()
+ // Add dummy values for not-yet-existent prod deployments, and running dev/perf deployments.
+ Stream.concat(status.jobSteps().keySet().stream()
.filter(job -> job.application().instance().equals(instance.name()))
- .filter(job -> job.type().isProduction() && job.type().isDeployment())
+ .filter(job -> job.type().isProduction() && job.type().isDeployment()),
+ controller.jobController().active(instance.id()).stream()
+ .map(run -> run.id().job())
+ .filter(job -> job.type().environment().isManuallyDeployed()))
.map(job -> job.type().zone(controller.system()))
.filter(zone -> ! instance.deployments().containsKey(zone))
.forEach(zone -> {
@@ -1304,6 +1307,7 @@ public class ApplicationApiHandler extends AuditLoggingRequestHandler {
deploymentObject.setString("region", zone.region().value());
});
+
// TODO jonmv: Remove when clients are updated
application.deployKeys().stream().findFirst().ifPresent(key -> object.setString("pemDeployKey", KeyUtils.toPem(key)));
