File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44# then delegates to the original run script of the base image.
55set -ue
66
7+ JAVA_INSTALLED_PKGS_LOGS=" /tmp/java_installed_pkgs.log"
8+
79echo " Deleting .kube to avoid weird caching issues (see https://github.com/opendevstack/ods-core/issues/473)"
810rm -rf $HOME /.kube || true
911
10- echo " Verifying if Java 17 is installed ..."
12+ echo " Removing any existing Java package logs ..."
13+ rm -fv ${JAVA_INSTALLED_PKGS_LOGS}
14+
15+ echo " Verifying if Java is installed ..."
1116yum list installed | grep -i " \(java\|jre\)" | tee -a ${JAVA_INSTALLED_PKGS_LOGS}
1217if grep -qi " java-17" ${JAVA_INSTALLED_PKGS_LOGS} ; then
1318 echo " Java 17 is installed. Proceeding to remove other versions..."
@@ -38,8 +43,11 @@ if grep -qi "java-17" ${JAVA_INSTALLED_PKGS_LOGS}; then
3843
3944 echo " Cleaning up yum cache ..."
4045 yum clean all
46+
47+ echo " Removing temporary Java package logs ..."
48+ rm -fv ${JAVA_INSTALLED_PKGS_LOGS}
4149else
42- echo " Java 17 is not installed. Skipping removal of other versions."
50+ echo " No Java version is installed. Skipping removal of other versions."
4351fi
4452
4553# Openshift default CA. See https://docs.openshift.com/container-platform/3.11/dev_guide/secrets.html#service-serving-certificate-secrets
You can’t perform that action at this time.
0 commit comments