Skip to content

Commit f38b657

Browse files
voxparcxlswcgunter
andauthored
Fix java & camunda version Export (#201)
* add camunda and java exports * Move fetching of versions from configs to system vars * Change how we determine the Java version (use Runtime.version() instead of setting environment variable) --------- Co-authored-by: wcgunter <[email protected]>
1 parent ceeecbe commit f38b657

File tree

4 files changed

+3
-31
lines changed

4 files changed

+3
-31
lines changed

ci/ci.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@ default_cws_auth_scheme=CAMUNDA
123123
default_history_level=full
124124
default_shutdown_port=38005
125125
metrics_publishing_interval=10
126-
camunda_version=${CAMUNDA_VER}
127-
java_version=${JAVA_HOME_VERSION}
128-
java_home=${JAVA_HOME}
129126
EOF
130127

131128

@@ -184,9 +181,6 @@ aws_cloudwatch_endpoint=monitoring.us-west-1.amazonaws.com
184181
default_history_level=full
185182
default_shutdown_port=38005
186183
metrics_publishing_interval=10
187-
camunda_version=${CAMUNDA_VER}
188-
java_version=${JAVA_HOME_VERSION}
189-
java_home=${JAVA_HOME}
190184
EOF
191185

192186

cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,6 @@ public class CwsInstaller {
236236
private static String aws_sqs_dispatcher_sqsUrl;
237237
private static String aws_sqs_dispatcher_msgFetchLimit;
238238

239-
private static String camunda_version;
240-
241-
private static String java_version;
242-
private static String java_home = System.getenv("JAVA_HOME");
243-
244239

245240
private static Boolean reconfigure = false;
246241

@@ -374,9 +369,6 @@ private static void init() {
374369
ldap_identity_plugin_class = getPreset(LDAP_IDENTITY_PLUGIN_CLASS);
375370
ldap_security_filter_class = getPreset(LDAP_SECURITY_FILTER_CLASS);
376371
camunda_security_filter_class = getPreset(CAMUNDA_SECURITY_FILTER_CLASS);
377-
camunda_version = getPreset("camunda_version");
378-
379-
java_version = getPreset("java_version");
380372
}
381373

382374
private static void exit(int status) {
@@ -3026,10 +3018,6 @@ private static void updateCwsUiProperties() throws IOException {
30263018
content = content.replace("__AWS_SQS_DISPATCHER_MSG_FETCH_LIMIT__", aws_sqs_dispatcher_msgFetchLimit);
30273019
}
30283020

3029-
content = content.replace("__CWS_CAMUNDA_VERSION__", camunda_version);
3030-
content = content.replace("__CWS_JAVA_VERSION__", java_version);
3031-
content = content.replace("__CWS_JAVA_HOME__", java_home);
3032-
30333021
writeToFile(filePath, content);
30343022
copy(
30353023
Paths.get(config_work_dir + SEP + "cws-ui" + SEP + "cws-ui.properties"),

cws-service/src/main/java/jpl/cws/controller/MvcCore.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ public class MvcCore {
4040
@Value("${cws.history.days.to.live}") private String historyDaysToLive;
4141
@Value("${cws.history.level}") private String historyLevel;
4242

43-
@Value("${cws.camunda.version}") private String camundaVersion;
44-
45-
@Value("${cws.java.home}") private String javaHome;
46-
@Value("${cws.java.version}") private String javaVersion;
47-
4843
public MvcCore() {}
4944

5045
protected ModelAndView buildModel(String page, String message) {
@@ -188,11 +183,9 @@ protected ModelAndView buildConfigurationModel(String message) {
188183
model.addObject("tomcatWebapps", tomcatWebapps);
189184
model.addObject("historyDaysToLive", historyDaysToLive);
190185
model.addObject("historyLevel", historyLevel);
191-
192-
model.addObject("camundaVersion", camundaVersion);
193-
194-
model.addObject("javaHome", javaHome);
195-
model.addObject("javaVersion", javaVersion);
186+
model.addObject("javaHome", System.getenv("JAVA_HOME"));
187+
model.addObject("javaVersion", Runtime.version().toString());
188+
model.addObject("camundaVersion", System.getenv("CAMUNDA_VER"));
196189

197190
DiskUsage diskUsage = cwsConsoleService.getDiskUsage();
198191

utils.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,5 @@ function auto_conf_data () {
319319
cws_notification_emails=${NOTIFICATION_EMAILS}
320320
cws_token_expiration_hours=240
321321
user_provided_logstash=n
322-
camunda_version=${CAMUNDA_VER}
323-
java_version=${JAVA_HOME_VERSION}
324-
java_home=${JAVA_HOME}
325322
EOF
326323
}

0 commit comments

Comments
 (0)