Skip to content

Commit

Permalink
Small rename and refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Filip Drobnjakovic <[email protected]>
  • Loading branch information
Tjofil committed Jan 22, 2023
1 parent 3c70d39 commit eabc15d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
# Enable RCA for Integration Tests
- name: Spin up Docker cluster for integ testing
working-directory: ./tmp/performance-analyzer-rca
run: ./gradlew enableRca -Dbuild.jdk_version=${{matrix.java}}
run: ./gradlew enableRca -Dbuild.docker_jdk_ver=${{matrix.java}}

# Run Integration Tests in PA
- name: Run integration tests
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ext {
opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT")
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
jdkVersion = System.getProperty("build.jdk_version", "11")
buildDockerJdkVersion = System.getProperty("build.docker_jdk_ver", "11")

// 3.0.0-SNAPSHOT -> 3.0.0.0-SNAPSHOT
version_tokens = opensearch_version.tokenize('-')
Expand Down Expand Up @@ -463,7 +463,7 @@ task buildDocker(type: Exec) {
dependsOn(copyAllArtifacts)

workingDir(dockerArtifactsDir)
commandLine 'docker', 'build', '-t', 'opensearch/pa-rca:3.0', '.', '--build-arg', "JDK_VER=${jdkVersion}"
commandLine 'docker', 'build', '-t', 'opensearch/pa-rca:3.0', '.', '--build-arg', "JDK_VER=${buildDockerJdkVersion}"
}

task runDocker(type: Exec) {
Expand Down
11 changes: 6 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ ARG JDK_VER=11

ENV PATH /usr/share/opensearch/bin:$PATH

RUN if [[ "${JDK_VER}" = "11" ]] ; then \
curl -s https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz | tar -C /opt -zxf -; \
mkdir /opt/jdk ; \
mv -v /opt/jdk-11.0.1/* /opt/jdk; \
elif [[ "${JDK_VER}" = "17" ]] ; then \
RUN if [[ "${JDK_VER}" = "17" ]] ; then \
curl -s https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz | tar -C /opt -zxf -; \
mkdir /opt/jdk ; \
mv -v /opt/jdk-17.0.2/* /opt/jdk; \
else \
curl -s https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz | tar -C /opt -zxf -; \
mkdir /opt/jdk ; \
mv -v /opt/jdk-11.0.1/* /opt/jdk; \
fi


ENV OPENSEARCH_JAVA_HOME /opt/jdk
RUN yum install -y unzip
RUN yum install -y lsof
Expand Down

0 comments on commit eabc15d

Please sign in to comment.