Skip to content

Commit

Permalink
[irods/irods#6437] use jdk 11 on debian-11
Browse files Browse the repository at this point in the history
  • Loading branch information
d-w-moore authored and alanking committed Jun 11, 2022
1 parent 3fb7106 commit ab39572
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions irods_consortium_continuous_integration_test_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@ def get_matching_packages(directory,ext):
def get_build_prerequisites_all():
return['gcc', 'swig']

def platform_including_major_revision():
return ( irods_python_ci_utilities.get_distribution(),
irods_python_ci_utilities.get_distribution_version_major() )

def get_build_prerequisites_apt():
jdk_versions = { ('Debian gnu_linux','11'):'11' }
jdk_major = jdk_versions.get(platform_including_major_revision(),'8')
pre_reqs = ['uuid-dev', 'libssl-dev', 'libsasl2-2', 'libsasl2-dev', 'python3-dev']
pre_reqs += ['openjdk-8-jre','curl', 'python3-pip']
pre_reqs += ['openjdk-{}-jre'.format(jdk_major)]
pre_reqs += ['curl', 'python3-pip']
return get_build_prerequisites_all()+pre_reqs

def get_build_prerequisites_yum():
Expand Down Expand Up @@ -54,13 +61,9 @@ class WrongJavaAsDefault (RuntimeError): pass
def install_build_prerequisites():
global Java_Home
irods_python_ci_utilities.install_os_packages(get_build_prerequisites())
java_version_check = re.compile('openjdk version[^\d]*1\.8\.',re.MULTILINE)
java_version_text = '\n'.join(irods_python_ci_utilities.subprocess_get_output(['/usr/bin/java','-version'])[1:3])
# Java 8 or Later should be used, depending on the Elasticsearch version
java_real_bin = os.path.realpath('/usr/bin/java')
Java_Home = os.path.sep.join((java_real_bin.split(os.path.sep))[:-2])
if not java_version_check.search( java_version_text ):
raise WrongJavaAsDefault


class IndexerNotImplemented (RuntimeError): pass
class WrongNumberOfGlobResults (RuntimeError): pass
Expand Down

0 comments on commit ab39572

Please sign in to comment.