This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new 1a56bd8  [ci] Move CI to JDK11 (#3027)
1a56bd8 is described below

commit 1a56bd890674145c6a3414f806f0c5d178b958e3
Author: Nicolò Boschi <[email protected]>
AuthorDate: Wed Mar 2 09:05:11 2022 +0100

    [ci] Move CI to JDK11 (#3027)
---
 .github/workflows/bookie-tests.yml                 |  7 ++-
 .github/workflows/client-tests.yml                 |  7 ++-
 .github/workflows/compatibility-check-java11.yml   |  7 ++-
 .github/workflows/integration-tests.yml            |  9 +--
 .github/workflows/pr-validation.yml                |  7 ++-
 .github/workflows/remaining-tests.yml              |  7 ++-
 .github/workflows/replication-tests.yml            |  7 ++-
 .github/workflows/stream-tests.yml                 |  7 ++-
 .github/workflows/tls-tests.yml                    |  7 ++-
 .../bookkeeper/bookie/BookieJournalTest.java       |  2 +
 .../bookie/BookieWriteToJournalTest.java           |  2 +
 .../docker-images/current-version-image/Dockerfile | 66 ----------------------
 .../current-version-image/image_builder.sh         | 46 ---------------
 .../scripts/install-python-client.sh               | 24 --------
 tests/docker-images/images_builder.sh              |  1 -
 tests/docker-images/statestore-image/Dockerfile    |  4 +-
 16 files changed, 43 insertions(+), 167 deletions(-)

diff --git a/.github/workflows/bookie-tests.yml 
b/.github/workflows/bookie-tests.yml
index 8c0da44..d18acc0 100644
--- a/.github/workflows/bookie-tests.yml
+++ b/.github/workflows/bookie-tests.yml
@@ -44,10 +44,11 @@ jobs:
       - name: Tune Runner VM
         uses: ./.github/actions/tune-runner-vm
 
-      - name: Set up JDK 1.8
-        uses: actions/setup-java@v1
+      - name: Set up JDK 11
+        uses: actions/setup-java@v2
         with:
-          java-version: 1.8
+          distribution: 'temurin'
+          java-version: 11
 
       - name: Run bookie test
         run: ./gradlew bookkeeper-server:test 
--tests="org.apache.bookkeeper.bookie.*" ${GRADLE_ARGS}
diff --git a/.github/workflows/client-tests.yml 
b/.github/workflows/client-tests.yml
index 36bd403..2ce243a 100644
--- a/.github/workflows/client-tests.yml
+++ b/.github/workflows/client-tests.yml
@@ -44,10 +44,11 @@ jobs:
       - name: Tune Runner VM
         uses: ./.github/actions/tune-runner-vm
 
-      - name: Set up JDK 1.8
-        uses: actions/setup-java@v1
+      - name: Set up JDK 11
+        uses: actions/setup-java@v2
         with:
-          java-version: 1.8
+          distribution: 'temurin'
+          java-version: 11
       - name: Run client tests
         run: ./gradlew bookkeeper-server:test 
--tests="org.apache.bookkeeper.client.*" ${GRADLE_ARGS}
 
diff --git a/.github/workflows/compatibility-check-java11.yml 
b/.github/workflows/compatibility-check-java11.yml
index 9f2ef49..52c23e6 100644
--- a/.github/workflows/compatibility-check-java11.yml
+++ b/.github/workflows/compatibility-check-java11.yml
@@ -44,10 +44,11 @@ jobs:
       - name: Tune Runner VM
         uses: ./.github/actions/tune-runner-vm
 
-      - name: Set up JDK 1.11
-        uses: actions/setup-java@v1
+      - name: Set up JDK 11
+        uses: actions/setup-java@v2
         with:
-          java-version: 1.11
+          distribution: 'temurin'
+          java-version: 11
       - name: Build with gradle
         run: |
           ./gradlew test -x bookkeeper-server:test -x 
tests:integration:cluster:test -x tests:integration:smoke:test -x 
tests:integration:standalone:test -PexcludeTests="**/distributedlog/**, 
**/statelib/**, **/clients/**, **/*common/**, **/stream/**, **/stream/*bk*/**, 
**/*backward*/**" ${GRADLE_ARGS}
diff --git a/.github/workflows/integration-tests.yml 
b/.github/workflows/integration-tests.yml
index 0a4cf3a..29ecf36 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -44,15 +44,16 @@ jobs:
       - name: Tune Runner VM
         uses: ./.github/actions/tune-runner-vm
 
-      - name: Set up JDK 1.8
-        uses: actions/setup-java@v1
+      - name: Set up JDK 11
+        uses: actions/setup-java@v2
         with:
-          java-version: 1.8
+          distribution: 'temurin'
+          java-version: 11
 
       - name: Build tar
         run: ./gradlew stream:server:build -x test ${GRADLE_ARGS}
       - name: run cluster integration test
-        run: ./gradlew :tests:integration:cluster:test ${GRADLE_ARGS}
+        run: ./gradlew :tests:integration:cluster:test ${GRADLE_ARGS} || (tail 
-n +1 tests/integration/cluster/build/reports/tests/test/classes/* && tail -n 
+1 tests/integration/cluster/build/container-logs/**/* && exit 1)
       - name: run smoke test
         run: ./gradlew tests:integration:smoke:test ${GRADLE_ARGS}
       - name: run standalone test
diff --git a/.github/workflows/pr-validation.yml 
b/.github/workflows/pr-validation.yml
index 0f4cba2..2f14c6f 100644
--- a/.github/workflows/pr-validation.yml
+++ b/.github/workflows/pr-validation.yml
@@ -45,10 +45,11 @@ jobs:
       - name: Tune Runner VM
         uses: ./.github/actions/tune-runner-vm
 
-      - name: Set up JDK 1.8
-        uses: actions/setup-java@v1
+      - name: Set up JDK 11
+        uses: actions/setup-java@v2
         with:
-          java-version: 1.8
+          distribution: 'temurin'
+          java-version: 11
       - name: Validate pull request
         run: ./gradlew build -x signDistTar -x test ${GRADLE_ARGS}
         
diff --git a/.github/workflows/remaining-tests.yml 
b/.github/workflows/remaining-tests.yml
index 38f8b31..214b421 100644
--- a/.github/workflows/remaining-tests.yml
+++ b/.github/workflows/remaining-tests.yml
@@ -45,10 +45,11 @@ jobs:
       - name: Tune Runner VM
         uses: ./.github/actions/tune-runner-vm
 
-      - name: Set up JDK 1.8
-        uses: actions/setup-java@v1
+      - name: Set up JDK 11
+        uses: actions/setup-java@v2
         with:
-          java-version: 1.8
+          distribution: 'temurin'
+          java-version: 11
       - name: Run remaining tests
         run: ./gradlew bookkeeper-server:test 
-PexcludeTests="**/org/apache/bookkeeper/bookie/*, 
**/org/apache/bookkeeper/client/*, **/org/apache/bookkeeper/replication/*, 
**/org/apache/bookkeeper/tls/*" ${GRADLE_ARGS}
 
diff --git a/.github/workflows/replication-tests.yml 
b/.github/workflows/replication-tests.yml
index 06fe4c3..21c4755 100644
--- a/.github/workflows/replication-tests.yml
+++ b/.github/workflows/replication-tests.yml
@@ -44,10 +44,11 @@ jobs:
       - name: Tune Runner VM
         uses: ./.github/actions/tune-runner-vm
 
-      - name: Set up JDK 1.8
-        uses: actions/setup-java@v1
+      - name: Set up JDK 11
+        uses: actions/setup-java@v2
         with:
-          java-version: 1.8
+          distribution: 'temurin'
+          java-version: 11
       - name: Run replication tests
         run: ./gradlew bookkeeper-server:test 
--tests="org.apache.bookkeeper.replication.*" ${GRADLE_ARGS}
 
diff --git a/.github/workflows/stream-tests.yml 
b/.github/workflows/stream-tests.yml
index bbfda24..28a7fcf 100644
--- a/.github/workflows/stream-tests.yml
+++ b/.github/workflows/stream-tests.yml
@@ -43,10 +43,11 @@ jobs:
       - name: Tune Runner VM
         uses: ./.github/actions/tune-runner-vm
 
-      - name: Set up JDK 1.8
-        uses: actions/setup-java@v1
+      - name: Set up JDK 11
+        uses: actions/setup-java@v2
         with:
-          java-version: 1.8
+          distribution: 'temurin'
+          java-version: 11
       - name: Run stream:distributedlog:core tests
         run: ./gradlew stream:distributedlog:core:test ${GRADLE_ARGS}
       - name: Run stream:distributedlog:common tests
diff --git a/.github/workflows/tls-tests.yml b/.github/workflows/tls-tests.yml
index 4281947..9d94fe0 100644
--- a/.github/workflows/tls-tests.yml
+++ b/.github/workflows/tls-tests.yml
@@ -44,10 +44,11 @@ jobs:
       - name: Tune Runner VM
         uses: ./.github/actions/tune-runner-vm
 
-      - name: Set up JDK 1.8
-        uses: actions/setup-java@v1
+      - name: Set up JDK 11
+        uses: actions/setup-java@v2
         with:
-          java-version: 1.8
+          distribution: 'temurin'
+          java-version: 11
       - name: Run tls tests
         run: ./gradlew bookkeeper-server:test 
--tests="org.apache.bookkeeper.tls.*" ${GRADLE_ARGS}
 
diff --git 
a/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieJournalTest.java
 
b/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieJournalTest.java
index 0aceb5e..7ddb9b0 100644
--- 
a/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieJournalTest.java
+++ 
b/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieJournalTest.java
@@ -50,6 +50,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mockito;
 import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
 import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
 import org.slf4j.Logger;
@@ -60,6 +61,7 @@ import org.slf4j.LoggerFactory;
  */
 @RunWith(PowerMockRunner.class)
 @PrepareForTest({JournalChannel.class, FileChannelProvider.class})
+@PowerMockIgnore({"jdk.internal.loader.*", "javax.naming.*"})
 public class BookieJournalTest {
     private static final Logger LOG = 
LoggerFactory.getLogger(BookieJournalTest.class);
 
diff --git 
a/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieWriteToJournalTest.java
 
b/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieWriteToJournalTest.java
index 873bb33..df47dfe 100644
--- 
a/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieWriteToJournalTest.java
+++ 
b/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieWriteToJournalTest.java
@@ -49,6 +49,7 @@ import org.junit.rules.TemporaryFolder;
 import org.junit.runner.RunWith;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
 import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
 
@@ -57,6 +58,7 @@ import org.powermock.modules.junit4.PowerMockRunner;
  */
 @RunWith(PowerMockRunner.class)
 @PrepareForTest({BookieImpl.class})
+@PowerMockIgnore({"jdk.internal.loader.*", "javax.naming.*"})
 @Slf4j
 public class BookieWriteToJournalTest {
 
diff --git a/tests/docker-images/current-version-image/Dockerfile 
b/tests/docker-images/current-version-image/Dockerfile
deleted file mode 100644
index 9a74fd9..0000000
--- a/tests/docker-images/current-version-image/Dockerfile
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-FROM centos:7
-MAINTAINER Apache BookKeeper <[email protected]>
-
-ARG BK_VERSION=DOESNOTEXISTS
-ARG DISTRO_NAME=bookkeeper-dist-server-${BK_VERSION}-bin
-ARG PKG_NAME=bookkeeper-server-${BK_VERSION}
-
-ENV BOOKIE_PORT=3181
-ENV BOOKIE_HTTP_PORT=8080
-ENV BOOKIE_GRPC_PORT=4181
-EXPOSE ${BOOKIE_PORT} ${BOOKIE_HTTP_PORT} ${BOOKIE_GRPC_PORT}
-ENV BK_USER=bookkeeper
-ENV BK_HOME=/opt/bookkeeper
-ENV JAVA_HOME=/usr/lib/jvm/java-11
-
-# prepare utils
-RUN set -x \
-    && adduser "${BK_USER}" \
-    && yum install -y epel-release \
-    && yum install -y java-11-openjdk-devel wget bash python-pip python-devel 
sudo netcat gcc gcc-c++ \
-    && mkdir -pv /opt \
-    && cd /opt \
-    # install zookeeper shell
-    && wget -q https://bootstrap.pypa.io/pip/2.7/get-pip.py \
-    && python get-pip.py \
-    && pip install zk-shell \
-    && rm -rf get-pip.py \
-    && yum clean all
-
-# untar tarballs
-ADD build/package/${DISTRO_NAME}.tar.gz /opt
-RUN mv /opt/${PKG_NAME} /opt/bookkeeper
-
-WORKDIR /opt/bookkeeper
-
-COPY build/package/scripts /opt/bookkeeper/scripts
-COPY scripts/install-python-client.sh /opt/bookkeeper/scripts
-RUN chmod +x -R /opt/bookkeeper/scripts/
-
-# copy the python client
-ADD build/package/bookkeeper-client/ /opt/bookkeeper/bookkeeper-client
-RUN /opt/bookkeeper/scripts/install-python-client.sh
-
-ENTRYPOINT [ "/bin/bash", "/opt/bookkeeper/scripts/entrypoint.sh" ]
-CMD ["bookie"]
-
-HEALTHCHECK --interval=10s --timeout=60s CMD /bin/bash 
/opt/bookkeeper/scripts/healthcheck.sh
diff --git a/tests/docker-images/current-version-image/image_builder.sh 
b/tests/docker-images/current-version-image/image_builder.sh
deleted file mode 100755
index 8719bd5..0000000
--- a/tests/docker-images/current-version-image/image_builder.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-#
-#/**
-# * Licensed to the Apache Software Foundation (ASF) under one
-# * or more contributor license agreements.  See the NOTICE file
-# * distributed with this work for additional information
-# * regarding copyright ownership.  The ASF licenses this file
-# * to you under the Apache License, Version 2.0 (the
-# * "License"); you may not use this file except in compliance
-# * with the License.  You may obtain a copy of the License at
-# *
-# *     http://www.apache.org/licenses/LICENSE-2.0
-# *
-# * Unless required by applicable law or agreed to in writing, software
-# * distributed under the License is distributed on an "AS IS" BASIS,
-# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# * See the License for the specific language governing permissions and
-# * limitations under the License.
-# */
-set -e
-IMAGE_NAME=apachebookkeeper/bookkeeper-current:latest
-FORCE_REBUILD="${BOOKKEEPER_DOCKER_IMAGES_FORCE_REBUILD:-false}"
-if [[ "$FORCE_REBUILD" != "true" && "$(docker images -q $IMAGE_NAME 2> 
/dev/null)" != "" ]]; then
-  echo "reusing local image: $IMAGE_NAME"
-  exit 0
-fi
-SCRIPT_DIR=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
-
-## BASE_DIR will be ./bookkeeper/
-BASE_DIR=${SCRIPT_DIR}/../../../
-
-mkdir -p ${BASE_DIR}/tests/docker-images/current-version-image/build
-OUTPUT_DIR=${BASE_DIR}/tests/docker-images/current-version-image/build/package
-rm -rf $OUTPUT_DIR
-mkdir -p $OUTPUT_DIR
-
-# Python Client
-${BASE_DIR}/stream/clients/python/scripts/docker_build.sh
-
-cp -Rp "${BASE_DIR}stream/clients/python/dist" 
"${OUTPUT_DIR}/bookkeeper-client"
-cp -Rp "${BASE_DIR}docker/scripts" "${OUTPUT_DIR}/scripts"
-
-VERSION=${1:-UNKNOWN}
-cp -p 
${BASE_DIR}bookkeeper-dist/server/build/distributions/bookkeeper-server-${VERSION}-bin.tar.gz
 "${OUTPUT_DIR}"/bookkeeper-dist-server-${VERSION}-bin.tar.gz
-
-docker build -t ${IMAGE_NAME} --build-arg BK_VERSION="${VERSION}" 
"${BASE_DIR}"/tests/docker-images/current-version-image
\ No newline at end of file
diff --git 
a/tests/docker-images/current-version-image/scripts/install-python-client.sh 
b/tests/docker-images/current-version-image/scripts/install-python-client.sh
deleted file mode 100644
index 2719b33..0000000
--- a/tests/docker-images/current-version-image/scripts/install-python-client.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-set -x
-
-WHEEL_FILE=`ls /opt/bookkeeper/bookkeeper-client/*.whl`
-pip install ${WHEEL_FILE}
diff --git a/tests/docker-images/images_builder.sh 
b/tests/docker-images/images_builder.sh
index b000cb2..ea0665b 100755
--- a/tests/docker-images/images_builder.sh
+++ b/tests/docker-images/images_builder.sh
@@ -28,5 +28,4 @@ cd ${BASE_DIR}
 time /bin/bash -e tests/docker-images/statestore-image/image_builder.sh
 time /bin/bash -e 
tests/docker-images/all-released-versions-image/image_builder.sh
 time /bin/bash -e tests/docker-images/all-versions-image/image_builder.sh 
${BK_VERSION}
-time /bin/bash -e tests/docker-images/current-version-image/image_builder.sh 
${BK_VERSION}
 
diff --git a/tests/docker-images/statestore-image/Dockerfile 
b/tests/docker-images/statestore-image/Dockerfile
index 6d36bda..961af1e 100644
--- a/tests/docker-images/statestore-image/Dockerfile
+++ b/tests/docker-images/statestore-image/Dockerfile
@@ -25,12 +25,12 @@ ENV BOOKIE_GRPC_PORT=4181
 EXPOSE ${BOOKIE_PORT} ${BOOKIE_HTTP_PORT} ${BOOKIE_GRPC_PORT}
 ENV BK_USER=bookkeeper
 ENV BK_HOME=/opt/bookkeeper
-ENV JAVA_HOME=/usr/lib/jvm/jre-1.8.0
+ENV JAVA_HOME=/usr/lib/jvm/java-11
 
 
 RUN set -x \
     && adduser "${BK_USER}" \
-    && yum install -y java-1.8.0-openjdk-headless wget bash sudo \
+    && yum install -y java-11-openjdk-devel wget bash python-pip python-devel 
sudo netcat gcc gcc-c++ \
     && wget -q https://bootstrap.pypa.io/pip/2.7/get-pip.py \
     && python get-pip.py \
     && pip install zk-shell \

Reply via email to