diff --git a/.github/workflows/e2e.cluster.yaml b/.github/workflows/e2e.cluster.yaml index d2f82f26870598d2a95993ddbd0915a0e6c4f886..53ec5554938d9480c052314f006c31ef559c3266 100644 --- a/.github/workflows/e2e.cluster.yaml +++ b/.github/workflows/e2e.cluster.yaml @@ -49,7 +49,7 @@ jobs: git submodule sync --recursive git -c protocol.version=2 submodule update --init --force --recursive --depth=1 - name: Compile and Build - run: make docker && ES_VERSION=es7 TAG=latest-es7 make docker + run: make docker && ES_VERSION=es7 TAG=latest-es7 make docker.oap - name: Copy dist package run: cp -R dist test/e2e/ - name: Cluster with ${{ matrix.coordinator }} and ${{ matrix.storage }} diff --git a/.github/workflows/e2e.jdk-versions.yaml b/.github/workflows/e2e.jdk-versions.yaml index 4eb5be5db6fb47eb2dadd5b16038be129ba57725..272c1b1110ac3eb3d9fd67212c4221591b9d902b 100644 --- a/.github/workflows/e2e.jdk-versions.yaml +++ b/.github/workflows/e2e.jdk-versions.yaml @@ -39,6 +39,7 @@ jobs: env: SW_SIMPLE_CASE: jdk SW_AGENT_JDK_VERSION: ${{ matrix.jdk }} + SW_OAP_BASE_IMAGE: adoptopenjdk/openjdk${{ matrix.jdk }}:alpine steps: - uses: actions/checkout@v2 - name: Checkout Submodules @@ -46,6 +47,10 @@ jobs: run: | git submodule sync --recursive git -c protocol.version=2 submodule update --init --force --recursive --depth=1 + - name: Set Up Java + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.jdk }} - name: Build Docker Image run: make docker - name: Copy dist package diff --git a/.github/workflows/e2e.profiling.yaml b/.github/workflows/e2e.profiling.yaml index 229468d1a3dbc2538378a083ff8ac4ceb1e5702d..59d4546738c1285d3d55e74b5d3264fa57f398bb 100644 --- a/.github/workflows/e2e.profiling.yaml +++ b/.github/workflows/e2e.profiling.yaml @@ -47,7 +47,7 @@ jobs: git submodule sync --recursive git -c protocol.version=2 submodule update --init --force --recursive --depth=1 - name: Compile and Build - run: make docker && ES_VERSION=es7 TAG=latest-es7 make docker + run: make docker && ES_VERSION=es7 TAG=latest-es7 make docker.oap - name: Copy dist package run: cp -R dist test/e2e/ - name: Profiling ${{ matrix.storage }} diff --git a/.github/workflows/e2e.storages.yaml b/.github/workflows/e2e.storages.yaml index c5c380b94486af1872c0e2a6a216c6c28881f040..d74e865001d2b5f5606f60c90ba3ca27565a38e7 100644 --- a/.github/workflows/e2e.storages.yaml +++ b/.github/workflows/e2e.storages.yaml @@ -47,7 +47,7 @@ jobs: git submodule sync --recursive git -c protocol.version=2 submodule update --init --force --recursive --depth=1 - name: Compile and Build - run: make docker && ES_VERSION=es7 TAG=latest-es7 make docker + run: make docker && ES_VERSION=es7 TAG=latest-es7 make docker.oap - name: Copy dist package run: cp -R dist test/e2e/ - name: Storage ${{ matrix.storage }} diff --git a/.github/workflows/e2e.ttl.yaml b/.github/workflows/e2e.ttl.yaml index c1dce823450997b91e3a37bfbe17744d0fda2a7b..9f9e39896db105acec23e1e4358f48c1e0998044 100644 --- a/.github/workflows/e2e.ttl.yaml +++ b/.github/workflows/e2e.ttl.yaml @@ -47,7 +47,7 @@ jobs: git submodule sync --recursive git -c protocol.version=2 submodule update --init --force --recursive --depth=1 - name: Compile and Build - run: make docker && ES_VERSION=es7 TAG=latest-es7 make docker + run: make docker && ES_VERSION=es7 TAG=latest-es7 make docker.oap - name: Copy dist package run: cp -R dist test/e2e/ - name: TTL of storage ${{ matrix.storage }} diff --git a/Makefile b/Makefile index 8838aef9ac2eff7f134e1188f3d83a127324fff0..1561285900b2ae79fb72d20bb2dcc491d7eec786 100644 --- a/Makefile +++ b/Makefile @@ -58,18 +58,22 @@ DOCKER_TARGETS:=docker.oap docker.ui docker.all: $(DOCKER_TARGETS) ifeq ($(ES_VERSION),es7) -docker.oap: $(SW_OUT)/apache-skywalking-apm-bin-es7.tar.gz -docker.oap: $(SW_ROOT)/docker/oap-es7/Dockerfile.oap -docker.oap: $(SW_ROOT)/docker/oap-es7/docker-entrypoint.sh -docker.oap: $(SW_ROOT)/docker/oap-es7/log4j2.xml - $(DOCKER_RULE) + DIST_NAME := apache-skywalking-apm-bin-es7 else -docker.oap: $(SW_OUT)/apache-skywalking-apm-bin.tar.gz + DIST_NAME := apache-skywalking-apm-bin +endif + +ifneq ($(SW_OAP_JAVA_VERSION),) + BUILD_ARGS := $(BUILD_ARGS) --build-arg JAVA_VERSION=$(SW_OAP_JAVA_VERSION) +endif + +BUILD_ARGS := $(BUILD_ARGS) --build-arg DIST_NAME=$(DIST_NAME) + +docker.oap: $(SW_OUT)/$(DIST_NAME).tar.gz docker.oap: $(SW_ROOT)/docker/oap/Dockerfile.oap docker.oap: $(SW_ROOT)/docker/oap/docker-entrypoint.sh docker.oap: $(SW_ROOT)/docker/oap/log4j2.xml $(DOCKER_RULE) -endif docker.ui: $(SW_OUT)/apache-skywalking-apm-bin.tar.gz docker.ui: $(SW_ROOT)/docker/ui/Dockerfile.ui diff --git a/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/pom.xml b/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/pom.xml index c2adc93e6b530f0530d8d662ff610e6deb3f48a9..3f55bddc57b2f69a19286d7d99c6e3ee27a8f9d2 100644 --- a/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/pom.xml +++ b/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/pom.xml @@ -34,7 +34,7 @@ UTF-8 6.34.0 - 2.11.8 + 2.11.12 @@ -78,4 +78,4 @@ - \ No newline at end of file + diff --git a/docker/oap-es7/Dockerfile.oap b/docker/oap-es7/Dockerfile.oap deleted file mode 100644 index 8ced58a2fc91ac255222f9ad6c0e1b4457ce57a4..0000000000000000000000000000000000000000 --- a/docker/oap-es7/Dockerfile.oap +++ /dev/null @@ -1,42 +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 openjdk:8u181-jdk-stretch - -ENV DIST_NAME=apache-skywalking-apm-bin-es7 \ - JAVA_OPTS=" -Xms256M " \ - SW_CLUSTER="standalone" \ - SW_STORAGE="h2" - -COPY "$DIST_NAME.tar.gz" / - -RUN set -ex; \ - tar -xzf "$DIST_NAME.tar.gz"; \ - rm -rf "$DIST_NAME.tar.gz"; \ - rm -rf "$DIST_NAME/config/log4j2.xml"; \ - rm -rf "$DIST_NAME/bin"; rm -rf "$DIST_NAME/webapp"; rm -rf "$DIST_NAME/agent"; \ - mv "$DIST_NAME" skywalking; - -WORKDIR skywalking - -COPY log4j2.xml config/ -COPY docker-entrypoint.sh . -RUN mkdir ext-config; \ - mkdir ext-libs; - -EXPOSE 12800 11800 1234 - -ENTRYPOINT ["bash", "docker-entrypoint.sh"] \ No newline at end of file diff --git a/docker/oap-es7/docker-entrypoint.sh b/docker/oap-es7/docker-entrypoint.sh deleted file mode 100755 index ae6a44bb60070f645dd5fc095ae41ea4e5c491ed..0000000000000000000000000000000000000000 --- a/docker/oap-es7/docker-entrypoint.sh +++ /dev/null @@ -1,46 +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. - -#!/bin/bash - -set -e - -echo "[Entrypoint] Apache SkyWalking Docker Image" - -if [[ "$SW_TELEMETRY" = "so11y" ]]; then - export SW_RECEIVER_SO11Y=default - echo "Set SW_RECEIVER_SO11Y to ${SW_RECEIVER_SO11Y}" -fi - -EXT_LIB_DIR=/skywalking/ext-libs -EXT_CONFIG_DIR=/skywalking/ext-config - -# Override configuration files -cp -vfR ${EXT_CONFIG_DIR}/ config/ - -CLASSPATH="config:$CLASSPATH" -for i in oap-libs/*.jar -do - CLASSPATH="$i:$CLASSPATH" -done -for i in ${EXT_LIB_DIR}/*.jar -do - CLASSPATH="$i:$CLASSPATH" -done - -set -ex -exec java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap \ - ${JAVA_OPTS} -classpath ${CLASSPATH} org.apache.skywalking.oap.server.starter.OAPServerStartUp "$@" diff --git a/docker/oap-es7/log4j2.xml b/docker/oap-es7/log4j2.xml deleted file mode 100644 index eb69a897dce06cd2bb9d3418f40354bff9c2abc2..0000000000000000000000000000000000000000 --- a/docker/oap-es7/log4j2.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/docker/oap/Dockerfile.oap b/docker/oap/Dockerfile.oap index a94490e9be6ff30d1913601dc4e84caf81db019f..ff94d3b9df9f60d9b7b32a0d8a67600ea77be268 100644 --- a/docker/oap/Dockerfile.oap +++ b/docker/oap/Dockerfile.oap @@ -14,13 +14,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM openjdk:8u181-jdk-stretch +ARG JAVA_VERSION=8 -ENV DIST_NAME=apache-skywalking-apm-bin \ - JAVA_OPTS=" -Xms256M " \ +FROM adoptopenjdk/openjdk$JAVA_VERSION:alpine + +ENV JAVA_OPTS=" -Xms256M " \ SW_CLUSTER="standalone" \ SW_STORAGE="h2" +ARG DIST_NAME + COPY "$DIST_NAME.tar.gz" / RUN set -ex; \ @@ -39,4 +42,4 @@ RUN mkdir ext-config; \ EXPOSE 12800 11800 1234 -ENTRYPOINT ["bash", "docker-entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["sh", "docker-entrypoint.sh"] diff --git a/docker/oap/docker-entrypoint.sh b/docker/oap/docker-entrypoint.sh index ae6a44bb60070f645dd5fc095ae41ea4e5c491ed..96cfb6d2e17288ba31ee2664865bb2b47530689b 100755 --- a/docker/oap/docker-entrypoint.sh +++ b/docker/oap/docker-entrypoint.sh @@ -1,3 +1,4 @@ +#!/bin/sh # 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 @@ -14,13 +15,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -#!/bin/bash - set -e echo "[Entrypoint] Apache SkyWalking Docker Image" -if [[ "$SW_TELEMETRY" = "so11y" ]]; then +if [ "$SW_TELEMETRY" = "so11y" ]; then export SW_RECEIVER_SO11Y=default echo "Set SW_RECEIVER_SO11Y to ${SW_RECEIVER_SO11Y}" fi @@ -36,11 +35,15 @@ for i in oap-libs/*.jar do CLASSPATH="$i:$CLASSPATH" done -for i in ${EXT_LIB_DIR}/*.jar +for i in "${EXT_LIB_DIR}"/*.jar do CLASSPATH="$i:$CLASSPATH" done +if java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -version; then + JAVA_OPTS="${JAVA_OPTS} -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap" +fi + set -ex -exec java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap \ - ${JAVA_OPTS} -classpath ${CLASSPATH} org.apache.skywalking.oap.server.starter.OAPServerStartUp "$@" + +exec java ${JAVA_OPTS} -classpath ${CLASSPATH} org.apache.skywalking.oap.server.starter.OAPServerStartUp "$@" diff --git a/pom.xml b/pom.xml index 4f21498a7ad95598c0628611e0145fd9c0f2c6c1..1aed5c670602d8551f9da43a485ac02f04f60afa 100755 --- a/pom.xml +++ b/pom.xml @@ -219,6 +219,7 @@ 1.5 2.7 true + 1.3.2 @@ -255,6 +256,12 @@ ${lombok.version} provided + + javax.annotation + javax.annotation-api + ${javax.annotation-api.version} + provided + diff --git a/test/e2e/e2e-common/src/main/java/org/apache/skywalking/e2e/SkyWalkingAnnotations.java b/test/e2e/e2e-common/src/main/java/org/apache/skywalking/e2e/SkyWalkingAnnotations.java index 34213cbf56e39d9fee0ae9fda68bd1bbb3b3103a..1dd7b6b1a61dc398e5b66de05c4253e32fa107c5 100644 --- a/test/e2e/e2e-common/src/main/java/org/apache/skywalking/e2e/SkyWalkingAnnotations.java +++ b/test/e2e/e2e-common/src/main/java/org/apache/skywalking/e2e/SkyWalkingAnnotations.java @@ -209,7 +209,9 @@ public final class SkyWalkingAnnotations { compose.withPull(true) .withLocalCompose(true) .withTailChildContainers(true) - .withRemoveImages(DockerComposeContainer.RemoveImages.ALL); + .withRemoveImages( + IS_CI ? DockerComposeContainer.RemoveImages.ALL : DockerComposeContainer.RemoveImages.LOCAL + ); if (IS_CI) { initLoggers(files, compose); diff --git a/test/e2e/e2e-test/docker/base-compose.yml b/test/e2e/e2e-test/docker/base-compose.yml index 1769914ab1927767a080401abc379480f28d13da..78b20d0fd5ef5f45ebefdc31e7670de318cfc498 100644 --- a/test/e2e/e2e-test/docker/base-compose.yml +++ b/test/e2e/e2e-test/docker/base-compose.yml @@ -35,7 +35,7 @@ services: JAVA_OPTS: >- -javaagent:/jacoco/jacocoagent.jar=classdumpdir=/jacoco/classes/oap,destfile=/jacoco/oap.exec,includes=org.apache.skywalking.*,excludes=org.apache.skywalking.oap.query.*:org.apache.skywalking.oap.server.core.query.* healthcheck: - test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/11800"] + test: ["CMD", "sh", "-c", "nc -zn 127.0.0.1 11800"] interval: 5s timeout: 60s retries: 120 @@ -59,7 +59,7 @@ services: JAVA_OPTS: >- -javaagent:/jacoco/jacocoagent.jar=classdumpdir=/jacoco/classes/oap,destfile=/jacoco/oap.exec,includes=org.apache.skywalking.*,excludes=org.apache.skywalking.oap.query.*:org.apache.skywalking.oap.server.core.query.* healthcheck: - test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/11800"] + test: ["CMD", "sh", "-c", "nc -zn 127.0.0.1 11800"] interval: 5s timeout: 60s retries: 120 diff --git a/test/e2e/e2e-test/docker/cluster/docker-compose.zk.mysql.yml b/test/e2e/e2e-test/docker/cluster/docker-compose.zk.mysql.yml index 1d750ef18a655ede5081366e83372c1a60b02b1f..51ac958069e829515bb51cbbeff687971187cea7 100644 --- a/test/e2e/e2e-test/docker/cluster/docker-compose.zk.mysql.yml +++ b/test/e2e/e2e-test/docker/cluster/docker-compose.zk.mysql.yml @@ -41,7 +41,7 @@ services: SW_STORAGE: mysql JAVA_OPTS: >- -javaagent:/jacoco/jacocoagent.jar=classdumpdir=/jacoco/classes/oap1,destfile=/jacoco/oap1.exec,includes=org.apache.skywalking.*,excludes=org.apache.skywalking.oap.query.*:org.apache.skywalking.oap.server.core.query.* - entrypoint: ['bash', '-c', '/download-mysql.sh && /skywalking/docker-entrypoint.sh'] + entrypoint: ['sh', '-c', '/download-mysql.sh && /skywalking/docker-entrypoint.sh'] depends_on: zk: condition: service_healthy @@ -57,7 +57,7 @@ services: SW_STORAGE: mysql JAVA_OPTS: >- -javaagent:/jacoco/jacocoagent.jar=classdumpdir=/jacoco/classes/oap2,destfile=/jacoco/oap2.exec,includes=org.apache.skywalking.*,excludes=org.apache.skywalking.oap.query.*:org.apache.skywalking.oap.server.core.query.* - entrypoint: ['bash', '-c', '/download-mysql.sh && /skywalking/docker-entrypoint.sh'] + entrypoint: ['sh', '-c', '/download-mysql.sh && /skywalking/docker-entrypoint.sh'] depends_on: zk: condition: service_healthy diff --git a/test/e2e/e2e-test/docker/download-mysql.sh b/test/e2e/e2e-test/docker/download-mysql.sh index 970937c9318a65e6b8511eb98ab5218a2e6dc333..2c9b852771e1c7c996c66c43bc9e2eecb4f7b8ac 100755 --- a/test/e2e/e2e-test/docker/download-mysql.sh +++ b/test/e2e/e2e-test/docker/download-mysql.sh @@ -12,16 +12,16 @@ # 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. -#!/usr/bin/env bash set -ex +apk add curl + SW_HOME=/skywalking MYSQL_URL="https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/8.0.13/mysql-connector-java-8.0.13.jar" MYSQL_DRIVER="mysql-connector-java-8.0.13.jar" -curl -L -o "${SW_HOME}/oap-libs/${MYSQL_DRIVER}" ${MYSQL_URL} -if [[ $? -ne 0 ]]; then +if ! curl -Lo "${SW_HOME}/oap-libs/${MYSQL_DRIVER}" ${MYSQL_URL}; then echo "Fail to download ${MYSQL_DRIVER}." exit 1 fi diff --git a/test/e2e/e2e-test/docker/profile/docker-compose.mysql.yml b/test/e2e/e2e-test/docker/profile/docker-compose.mysql.yml index aa4c5d1d1ba782811ffdbbd5f23005d7d6d22b8e..04917800d251ca591c29416db758791baf4000f6 100644 --- a/test/e2e/e2e-test/docker/profile/docker-compose.mysql.yml +++ b/test/e2e/e2e-test/docker/profile/docker-compose.mysql.yml @@ -41,7 +41,7 @@ services: depends_on: mysql: condition: service_healthy - entrypoint: ['bash', '-c', '/download-mysql.sh && /skywalking/docker-entrypoint.sh'] + entrypoint: ['sh', '-c', '/download-mysql.sh && /skywalking/docker-entrypoint.sh'] networks: e2e: diff --git a/test/e2e/e2e-test/docker/storage/docker-compose.mysql.yml b/test/e2e/e2e-test/docker/storage/docker-compose.mysql.yml index aa4c5d1d1ba782811ffdbbd5f23005d7d6d22b8e..04917800d251ca591c29416db758791baf4000f6 100644 --- a/test/e2e/e2e-test/docker/storage/docker-compose.mysql.yml +++ b/test/e2e/e2e-test/docker/storage/docker-compose.mysql.yml @@ -41,7 +41,7 @@ services: depends_on: mysql: condition: service_healthy - entrypoint: ['bash', '-c', '/download-mysql.sh && /skywalking/docker-entrypoint.sh'] + entrypoint: ['sh', '-c', '/download-mysql.sh && /skywalking/docker-entrypoint.sh'] networks: e2e: diff --git a/test/e2e/e2e-test/docker/storage/download-mysql.sh b/test/e2e/e2e-test/docker/storage/download-mysql.sh deleted file mode 100755 index 970937c9318a65e6b8511eb98ab5218a2e6dc333..0000000000000000000000000000000000000000 --- a/test/e2e/e2e-test/docker/storage/download-mysql.sh +++ /dev/null @@ -1,27 +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. -#!/usr/bin/env bash - -set -ex - -SW_HOME=/skywalking -MYSQL_URL="https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/8.0.13/mysql-connector-java-8.0.13.jar" -MYSQL_DRIVER="mysql-connector-java-8.0.13.jar" - -curl -L -o "${SW_HOME}/oap-libs/${MYSQL_DRIVER}" ${MYSQL_URL} -if [[ $? -ne 0 ]]; then - echo "Fail to download ${MYSQL_DRIVER}." - exit 1 -fi diff --git a/test/e2e/e2e-test/src/test/java/org/apache/skywalking/e2e/profile/ProfileE2E.java b/test/e2e/e2e-test/src/test/java/org/apache/skywalking/e2e/profile/ProfileE2E.java index 118c32dc3a365adfbda4b5e4b5da4d5169c74611..6be9faf765c9be57f9a19ed6de21a33df0a25479 100644 --- a/test/e2e/e2e-test/src/test/java/org/apache/skywalking/e2e/profile/ProfileE2E.java +++ b/test/e2e/e2e-test/src/test/java/org/apache/skywalking/e2e/profile/ProfileE2E.java @@ -257,12 +257,14 @@ public class ProfileE2E extends SkyWalkingTestAdapter { "/skywalking/tools/profile-exporter/profile_exporter.sh --taskid=%s --traceid=%s /tmp", taskId, traceId ); - final Container.ExecResult exportResult = oapContainer.execInContainer("/bin/bash", "-c", exportShell); + final Container.ExecResult exportResult = oapContainer.execInContainer("/bin/sh", "-c", exportShell); LOGGER.info("exported result: {}", exportResult); + assertThat(exportResult.getExitCode()).isEqualTo(0); + final String lsExportedFileShell = String.format("ls /tmp/%s.tar.gz", traceId); - final Container.ExecResult checkExportedFileResult = oapContainer.execInContainer("/bin/bash", "-c", lsExportedFileShell); + final Container.ExecResult checkExportedFileResult = oapContainer.execInContainer("/bin/sh", "-c", lsExportedFileShell); LOGGER.info("check exported file result: {}", checkExportedFileResult); diff --git a/tools/coverage/report.sh b/tools/coverage/report.sh index 8dd51356cb4cb5226fdcea998aee0161077d2cdc..7953a258062484c507a97ed205af684f07951272 100755 --- a/tools/coverage/report.sh +++ b/tools/coverage/report.sh @@ -28,6 +28,11 @@ ls -alh "${JACOCO_HOME}" for exec_data in "${JACOCO_HOME}"/*.exec; do exec_data=${exec_data/*\//} exec_data=${exec_data/.exec/} + + sudo rm -rf "${JACOCO_HOME}"/classes/"${exec_data}"/org/apache/skywalking/oap/server/core/query/entity || true + sudo rm -rf "${JACOCO_HOME}"/classes/"${exec_data}"/org/apache/skywalking/testcase || true + sudo rm -rf "${JACOCO_HOME}"/classes/"${exec_data}"/org/apache/skywalking/e2e || true + java -jar "${JACOCO_HOME}"/jacococli.jar report \ --classfiles "${JACOCO_HOME}"/classes/"$exec_data" \ --xml=/tmp/report-"$exec_data".xml \ diff --git a/tools/profile-exporter/profile_exporter.sh b/tools/profile-exporter/profile_exporter.sh index 6d658879411e2d34f6486e601ad08083605b3b4e..98a5b56100199039bbdb7d7355a293aed1794986 100755 --- a/tools/profile-exporter/profile_exporter.sh +++ b/tools/profile-exporter/profile_exporter.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh # # Licensed to the Apache Software Foundation (ASF) under one or more