Skip to content

Commit 1ef7cb4

Browse files
Support plugin tests on arm64/v8(aarm) platforms (#379)
1 parent 70b3e88 commit 1ef7cb4

8 files changed

Lines changed: 20 additions & 10 deletions

File tree

.github/actions/build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ inputs:
2222
base_image_java:
2323
description: "The Java Docker image under which this test case will run"
2424
required: false
25-
default: "adoptopenjdk/openjdk8:alpine"
25+
default: "eclipse-temurin:8-jdk"
2626
base_image_tomcat:
2727
description: "The Tomcat Docker image under which this test case will run"
2828
required: false

.github/workflows/plugins-jdk17-test.0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Build
4848
uses: ./.github/actions/build
4949
with:
50-
base_image_java: eclipse-temurin:17-alpine
50+
base_image_java: eclipse-temurin:17-jdk
5151
base_image_tomcat: tomcat:8.5-jdk17-openjdk
5252

5353
test:

CHANGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Release Notes.
55
8.14.0
66
------------------
77

8-
8+
* Polish test framework to support `arm64/v8` platforms
99

1010
#### Documentation
1111

docs/en/setup/service-agent/java-agent/Plugin-test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The test framework provides `JVM-container` and `Tomcat-container` base images i
2020

2121
### JVM-container Image Introduction
2222

23-
[JVM-container](../../../../../test/plugin/containers/jvm-container) uses `adoptopenjdk/openjdk8:alpine-jre` as the base image. `JVM-container` supports JDK8 and JDK17 as well in CI, which inherits `adoptopenjdk/openjdk8:alpine-jre` and `eclipse-temurin:17-alpine`.
23+
[JVM-container](../../../../../test/plugin/containers/jvm-container) uses `eclipse-temurin:8-jdk` as the base image. `JVM-container` supports JDK8 and JDK17 as well in CI, which inherits `eclipse-temurin:8-jdk` and `eclipse-temurin:17-jdk`.
2424
It is supported to custom the base Java docker image by specify `base_image_java`.
2525
The test case project must be packaged as `project-name.zip`, including `startup.sh` and uber jar, by using `mvn clean package`.
2626

test/plugin/containers/jvm-container/pom.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<plugin>
3737
<groupId>io.fabric8</groupId>
3838
<artifactId>docker-maven-plugin</artifactId>
39-
<version>0.33.0</version>
39+
<version>0.40.2</version>
4040
<configuration>
4141
<images>
4242
<image>
@@ -52,7 +52,9 @@
5252
<runCmds>
5353
<run>chmod +x /usr/local/skywalking/run.sh</run>
5454
<run>tar -xvf ../tools/skywalking-mock-collector.tar.gz -C ../tools</run>
55-
<run>apk add --no-cache bash curl</run>
55+
<run>apt-get update -y</run>
56+
<run>apt-get install -y unzip</run>
57+
<run>rm -rf /var/lib/apt/lists/*</run>
5658
</runCmds>
5759
<cmd>["/usr/local/skywalking/run.sh"]</cmd>
5860
</build>

test/plugin/containers/jvm-container/src/main/docker/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ java -jar \
102102
-Xmx256m -Xms256m \
103103
-DcaseName="${SCENARIO_NAME}-${SCENARIO_VERSION}" \
104104
-DtestCasePath=${SCENARIO_HOME}/data/ \
105-
${TOOLS_HOME}/skywalking-validator.jar 1>${LOGS_HOME}/validatolr.out
105+
${TOOLS_HOME}/skywalking-validator.jar 1>${LOGS_HOME}/validator.out
106106
status=$?
107107

108108
if [[ $status -eq 0 ]]; then

test/plugin/containers/tomcat-container/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<plugin>
3737
<groupId>io.fabric8</groupId>
3838
<artifactId>docker-maven-plugin</artifactId>
39-
<version>0.33.0</version>
39+
<version>0.40.2</version>
4040
<configuration>
4141
<images>
4242
<image>

test/plugin/run.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ scenarios_home="${home}/scenarios"
3131
num_of_testcases=
3232

3333
container_image_version="1.0.0"
34-
base_image_java="adoptopenjdk/openjdk8:alpine"
34+
base_image_java="eclipse-temurin:8-jdk"
3535
base_image_tomcat="tomcat:8.5-jdk8-openjdk"
3636
jacoco_version="${JACOCO_VERSION:-0.8.6}"
3737

@@ -148,6 +148,14 @@ agent_home_selector() {
148148
_agent_home=${target_agent_home}
149149
}
150150

151+
remove_dir() {
152+
dir=$1
153+
if [[ "${os}" == "Darwin" ]]; then
154+
find ${dir} -type d -exec chmod -a "$(whoami) deny delete" {} \;
155+
fi
156+
rm -rf $dir
157+
}
158+
151159
start_stamp=`date +%s`
152160
parse_commandline "$@"
153161

@@ -257,7 +265,7 @@ do
257265
bash ${case_work_base}/scenario.sh $debug_mode 1>${case_work_logs_dir}/${testcase_name}.log
258266
status=$?
259267
if [[ $status == 0 ]]; then
260-
[[ -z $debug_mode ]] && rm -rf ${case_work_base}
268+
[[ -z $debug_mode ]] && remove_dir ${case_work_base}
261269
else
262270
exitWithMessage "Testcase ${testcase_name} failed!"
263271
fi

0 commit comments

Comments
 (0)