Skip to content

Commit

Permalink
Fix java & camunda version Export (#201)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
voxparcxls and wcgunter authored Feb 21, 2024
1 parent ceeecbe commit f38b657
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 31 deletions.
6 changes: 0 additions & 6 deletions ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ default_cws_auth_scheme=CAMUNDA
default_history_level=full
default_shutdown_port=38005
metrics_publishing_interval=10
camunda_version=${CAMUNDA_VER}
java_version=${JAVA_HOME_VERSION}
java_home=${JAVA_HOME}
EOF


Expand Down Expand Up @@ -184,9 +181,6 @@ aws_cloudwatch_endpoint=monitoring.us-west-1.amazonaws.com
default_history_level=full
default_shutdown_port=38005
metrics_publishing_interval=10
camunda_version=${CAMUNDA_VER}
java_version=${JAVA_HOME_VERSION}
java_home=${JAVA_HOME}
EOF


Expand Down
12 changes: 0 additions & 12 deletions cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,6 @@ public class CwsInstaller {
private static String aws_sqs_dispatcher_sqsUrl;
private static String aws_sqs_dispatcher_msgFetchLimit;

private static String camunda_version;

private static String java_version;
private static String java_home = System.getenv("JAVA_HOME");


private static Boolean reconfigure = false;

Expand Down Expand Up @@ -374,9 +369,6 @@ private static void init() {
ldap_identity_plugin_class = getPreset(LDAP_IDENTITY_PLUGIN_CLASS);
ldap_security_filter_class = getPreset(LDAP_SECURITY_FILTER_CLASS);
camunda_security_filter_class = getPreset(CAMUNDA_SECURITY_FILTER_CLASS);
camunda_version = getPreset("camunda_version");

java_version = getPreset("java_version");
}

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

content = content.replace("__CWS_CAMUNDA_VERSION__", camunda_version);
content = content.replace("__CWS_JAVA_VERSION__", java_version);
content = content.replace("__CWS_JAVA_HOME__", java_home);

writeToFile(filePath, content);
copy(
Paths.get(config_work_dir + SEP + "cws-ui" + SEP + "cws-ui.properties"),
Expand Down
13 changes: 3 additions & 10 deletions cws-service/src/main/java/jpl/cws/controller/MvcCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ public class MvcCore {
@Value("${cws.history.days.to.live}") private String historyDaysToLive;
@Value("${cws.history.level}") private String historyLevel;

@Value("${cws.camunda.version}") private String camundaVersion;

@Value("${cws.java.home}") private String javaHome;
@Value("${cws.java.version}") private String javaVersion;

public MvcCore() {}

protected ModelAndView buildModel(String page, String message) {
Expand Down Expand Up @@ -188,11 +183,9 @@ protected ModelAndView buildConfigurationModel(String message) {
model.addObject("tomcatWebapps", tomcatWebapps);
model.addObject("historyDaysToLive", historyDaysToLive);
model.addObject("historyLevel", historyLevel);

model.addObject("camundaVersion", camundaVersion);

model.addObject("javaHome", javaHome);
model.addObject("javaVersion", javaVersion);
model.addObject("javaHome", System.getenv("JAVA_HOME"));
model.addObject("javaVersion", Runtime.version().toString());
model.addObject("camundaVersion", System.getenv("CAMUNDA_VER"));

DiskUsage diskUsage = cwsConsoleService.getDiskUsage();

Expand Down
3 changes: 0 additions & 3 deletions utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,5 @@ function auto_conf_data () {
cws_notification_emails=${NOTIFICATION_EMAILS}
cws_token_expiration_hours=240
user_provided_logstash=n
camunda_version=${CAMUNDA_VER}
java_version=${JAVA_HOME_VERSION}
java_home=${JAVA_HOME}
EOF
}

0 comments on commit f38b657

Please sign in to comment.