Skip to content

Commit

Permalink
First pass at switching to liberica jdk. (#5312)
Browse files Browse the repository at this point in the history
Authored-by: Sean Goller <sgoller@pivotal.io>
  • Loading branch information
smgoller committed Jun 26, 2020
1 parent b164321 commit 15d6d26
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set -e

WORK_DIR=$(mktemp -d)

export JAVA_HOME=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64
export JAVA_HOME=/usr/lib/jvm/bellsoft-java${JAVA_BUILD_VERSION}-amd64
echo "JAVA_HOME is [${JAVA_HOME}]"

if [ -z ${JAVA_HOME} ]; then
Expand Down
6 changes: 4 additions & 2 deletions ci/images/google-geode-builder/scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ apt-get install -y --no-install-recommends \

echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list
echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
echo "deb [arch=amd64] https://apt.bell-sw.com/ stable main" | sudo tee /etc/apt/sources.list.d/bellsoft.list
curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add -
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
curl -fsSL https://download.bell-sw.com/pki/GPG-KEY-bellsoft | apt-key add -
apt-get update
set +e && apt-get purge -y google-cloud-sdk lxc-docker && set -e
apt-get install -y --no-install-recommends \
Expand All @@ -55,8 +57,8 @@ apt-get install -y --no-install-recommends \

cp -R /etc/alternatives /etc/keep-alternatives
apt-get install -y --no-install-recommends \
openjdk-8-jdk \
openjdk-11-jdk
bellsoft-java11 \
bellsoft-java8
rm -rf /etc/alternatives
mv /etc/keep-alternatives /etc/alternatives

Expand Down
8 changes: 4 additions & 4 deletions ci/images/google-windows-geode-builder/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@
"inline": [
"$ErrorActionPreference = \"Stop\"",
"Set-ExecutionPolicy Bypass -Scope Process -Force",
"choco install -y git cygwin cyg-get adoptopenjdk11",
"Move-Item \"C:\\Program Files\\AdoptOpenJDK\\jdk-11*\" c:\\java11",
"choco install -y jdk8 -params 'installdir=c:\\\\java8tmp;source=false'",
"Move-Item \"C:\\java8tmp\" c:\\java8",
"choco install -y git cygwin cyg-get liberica11jdk",
"Move-Item \"C:\\Program Files\\BellSoft\\LibericaJDK-11*\" c:\\java11",
"choco install -y liberica8jdk",
"Move-Item \"C:\\Program Files\\BellSoft\\LibericaJDK-8*\" c:\\java8",
"choco install -y openssh --version 7.7.2.1 /SSHServerFeature",
"refreshenv",
"$OldPath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name PATH).Path",
Expand Down
6 changes: 4 additions & 2 deletions ci/images/test-container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ RUN apt-get update \
unzip \
xz-utils \
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& echo "deb [arch=amd64] https://apt.bell-sw.com/ stable main" > /etc/apt/sources.list.d/bellsoft.list \
&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& curl -fsSL https://download.bell-sw.com/pki/GPG-KEY-bellsoft | apt-key add - \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
aptitude \
Expand All @@ -46,8 +48,8 @@ RUN apt-get update \
&& useradd --shell /bin/bash -u 93043 -o -c "" -m geode \
&& cp -R /etc/alternatives /etc/keep-alternatives \
&& apt-get install -y --no-install-recommends \
openjdk-8-jdk \
openjdk-11-jdk \
bellsoft-java11 \
bellsoft-java8 \
&& rm -rf /etc/alternatives \
&& mv /etc/keep-alternatives /etc/alternatives \
&& apt-get clean \
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/execute_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ else
DUNIT_PARALLEL_FORKS=""
fi

SET_JAVA_HOME="export JAVA_HOME=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64"
SET_JAVA_HOME="export JAVA_HOME=/usr/lib/jvm/bellsoft-java${JAVA_BUILD_VERSION}-amd64"

if [ -v CALL_STACK_TIMEOUT ]; then
ssh ${SSH_OPTIONS} geode@${INSTANCE_IP_ADDRESS} "${SET_JAVA_HOME} && tmux new-session -d -s callstacks; tmux send-keys ~/capture-call-stacks.sh\ ${PARALLEL_DUNIT}\ ${CALL_STACK_TIMEOUT} C-m"
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/execute_build_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ INSTANCE_IP_ADDRESS="$(cat instance-data/instance-ip-address)"

GEODE_VERSION=$(jq -r .semver geode-passing-tokens/*.json)

SET_JAVA_HOME="export JAVA_HOME=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64"
SET_JAVA_HOME="export JAVA_HOME=/usr/lib/jvm/bellsoft-java${JAVA_BUILD_VERSION}-amd64"

GRADLE_COMMAND="./gradlew \
${DEFAULT_GRADLE_TASK_OPTIONS} \
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/execute_publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ SSH_OPTIONS="-i ${SSHKEY_FILE} -o ConnectionAttempts=60 -o StrictHostKeyChecking

INSTANCE_IP_ADDRESS="$(cat instance-data/instance-ip-address)"

SET_JAVA_HOME="export JAVA_HOME=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64"
SET_JAVA_HOME="export JAVA_HOME=/usr/lib/jvm/bellsoft-java${JAVA_BUILD_VERSION}-amd64"

GRADLE_COMMAND="./gradlew \
${DEFAULT_GRADLE_TASK_OPTIONS} \
Expand Down
4 changes: 2 additions & 2 deletions ci/scripts/execute_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ case $ARTIFACT_SLUG in
SEP=";"
;;
*)
JAVA_BUILD_PATH=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64
JAVA_TEST_PATH=/usr/lib/jvm/java-${JAVA_TEST_VERSION}-openjdk-amd64
JAVA_BUILD_PATH=/usr/lib/jvm/bellsoft-java${JAVA_BUILD_VERSION}-amd64
JAVA_TEST_PATH=/usr/lib/jvm/bellsoft-java${JAVA_TEST_VERSION}-amd64
SEP="&&"
;;
esac
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/rsync_code_down.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ case $ARTIFACT_SLUG in
EXEC_COMMAND="bash -c 'export JAVA_HOME=${JAVA_BUILD_PATH}; cd geode; ./gradlew --no-daemon combineReports'"
;;
*)
JAVA_BUILD_PATH=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64
JAVA_BUILD_PATH=/usr/lib/jvm/bellsoft-java${JAVA_BUILD_VERSION}-amd64
EXEC_COMMAND="bash -c 'export JAVA_HOME=${JAVA_BUILD_PATH} && cd geode && ./gradlew --no-daemon combineReports'"
;;
esac
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM openjdk:8-jre-alpine
FROM bellsoft/liberica-openjdk-alpine:8

# runtime dependencies
RUN apk add --no-cache \
Expand Down

0 comments on commit 15d6d26

Please sign in to comment.