Pass environment variables in defineCluster call

Change-Id: I5722998340262505bc185586eacc22f321a567c2
This commit is contained in:
Rudi Schlatte 2024-05-14 13:33:51 +02:00
parent 173752a608
commit 0875543d89

View File

@ -405,8 +405,10 @@ public class NebulousAppDeployer {
}); });
ObjectNode environment = cluster.withObject("/env-var"); ObjectNode environment = cluster.withObject("/env-var");
environment.put("APPLICATION_ID", appUUID); environment.put("APPLICATION_ID", appUUID);
// TODO: add other environment variables, also from app creation // TODO: pre-parse environment variables, put them into NebulousApp
// message (it has an "env" array) for (final JsonNode v : app.getOriginalAppMessage().withArray("/environmentVariables")) {
v.fields().forEachRemaining (field -> environment.put(field.getKey(), field.getValue().asText()));
}
log.info("Calling defineCluster"); log.info("Calling defineCluster");
boolean defineClusterSuccess = conn.defineCluster(appUUID, clusterName, cluster); boolean defineClusterSuccess = conn.defineCluster(appUUID, clusterName, cluster);
if (!defineClusterSuccess) { if (!defineClusterSuccess) {