Skip to content

Commit

Permalink
Merge branch 'master' into async
Browse files Browse the repository at this point in the history
  • Loading branch information
adermxzs committed Nov 4, 2019
2 parents 4c12c71 + c002a6b commit 5659a5f
Show file tree
Hide file tree
Showing 32 changed files with 1,305 additions and 55 deletions.
23 changes: 12 additions & 11 deletions Jenkinsfile-Agent-Test
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pipeline {
}

environment {
BUILD_NO="wl1_${BUILD_ID}"
MAVEN_OPTS = '-Dmaven.repo.local=.m2/repository -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx3g'
}

Expand Down Expand Up @@ -63,12 +64,12 @@ pipeline {
}
}
steps {
sh './mvnw -f test/plugin/pom.xml clean package -DskipTests -Dbuild_id=wl1_${BUILD_ID} docker:build'
sh './mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build'
}
}
stage('Test Cases Report (169)') {
steps {
echo "reserve."
echo "Test Cases Report"
}
}

Expand All @@ -83,36 +84,36 @@ pipeline {
stages {
stage('httpasyncclient 4.0-4.1.3 (7)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl1_${BUILD_ID} httpasyncclient-scenario'
sh 'bash test/plugin/run.sh httpasyncclient-scenario'
}
}
stage('httpclient 4.3.x-4.5.x (14)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl1_${BUILD_ID} httpclient-4.3.x-scenario'
sh 'bash test/plugin/run.sh httpclient-4.3.x-scenario'
}
}

stage('ehcache 2.8.x-2.10.x (19)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl1_${BUILD_ID} ehcache-2.x-scenario'
sh 'bash test/plugin/run.sh ehcache-2.x-scenario'
}
}

stage('dubbo 2.7.x (4)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl1_${BUILD_ID} dubbo-2.7.x-scenario'
sh 'bash test/plugin/run.sh dubbo-2.7.x-scenario'
}
}

stage('spring async 4.3.x-5.1.x (35)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl1_${BUILD_ID} spring-async-scenario'
sh 'bash test/plugin/run.sh spring-async-scenario'
}
}

stage('netty-socketio 1.x (4)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl1_${BUILD_ID} netty-socketio-scenario'
sh 'bash test/plugin/run.sh netty-socketio-scenario'
}
}
}
Expand All @@ -121,12 +122,12 @@ pipeline {
stages {
stage('jetty 9.x (63)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl1_${BUILD_ID} jetty-scenario'
sh 'bash test/plugin/run.sh jetty-scenario'
}
}
stage('undertow-routing-scenario 1.3.0-2.0.27 (23)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl1_${BUILD_ID} undertow-routing-scenario'
sh 'bash test/plugin/run.sh undertow-routing-scenario'
}
}
}
Expand All @@ -137,7 +138,7 @@ pipeline {

post {
cleanup {
sh 'bash test/plugin/run.sh --build_id=wl1_${BUILD_ID} --cleanup'
sh 'bash test/plugin/run.sh --cleanup'
deleteDir()
}
}
Expand Down
41 changes: 27 additions & 14 deletions Jenkinsfile-Agent-Test-2
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pipeline {
}

environment {
BUILD_NO="wl2_${BUILD_ID}"
MAVEN_OPTS = '-Dmaven.repo.local=.m2/repository -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx3g'
}

Expand Down Expand Up @@ -63,12 +64,12 @@ pipeline {
}
}
steps {
sh './mvnw -f test/plugin/pom.xml clean package -DskipTests -Dbuild_id=wl2_${BUILD_ID} docker:build'
sh './mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build'
}
}
stage('Test Cases Report (174)') {
stage('Test Cases Report (198)') {
steps {
echo "reserve."
echo "Test Cases Report"
}
}

Expand All @@ -81,45 +82,51 @@ pipeline {
parallel {
stage('Group1') {
stages {
stage('redisson-scenario 3.x (23)') {
steps {
sh 'bash test/plugin/run.sh redisson-scenario'
}
}

stage('spring-cloud-gateway 2.1.x (3)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl2_${BUILD_ID} gateway-scenario'
sh 'bash test/plugin/run.sh gateway-scenario'
}
}

stage('spring-webflux 2.x (18)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl2_${BUILD_ID} webflux-scenario'
sh 'bash test/plugin/run.sh webflux-scenario'
}
}

stage('dubbo 2.5.x-2.6.x (10)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl2_${BUILD_ID} dubbo-2.5.x-scenario'
sh 'bash test/plugin/run.sh dubbo-2.5.x-scenario'
}
}

stage('spring 3.0.x (8)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl2_${BUILD_ID} spring-3.0.x-scenario'
sh 'bash test/plugin/run.sh spring-3.0.x-scenario'
}
}

stage('spring 3.1.x-4.0.x (25)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl2_${BUILD_ID} spring-3.1.x-scenario'
sh 'bash test/plugin/run.sh spring-3.1.x-scenario'
}
}

stage('spring 4.1.x-4.2.x (20)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl2_${BUILD_ID} spring-4.1.x-scenario'
sh 'bash test/plugin/run.sh spring-4.1.x-scenario'
}
}

stage('apm-toolkit-trace (1)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl2_${BUILD_ID} apm-toolkit-trace-scenario'
sh 'bash test/plugin/run.sh apm-toolkit-trace-scenario'
}
}
}
Expand All @@ -128,18 +135,24 @@ pipeline {
stages {
stage('solrj 7.x (12)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl2_${BUILD_ID} solrj-7.x-scenario'
sh 'bash test/plugin/run.sh solrj-7.x-scenario'
}
}

stage('spring 4.3.x-5.2.x (54)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl2_${BUILD_ID} spring-4.3.x-scenario'
sh 'bash test/plugin/run.sh spring-4.3.x-scenario'
}
}
stage('undertow-scenario 1.3.0-2.0.27 (23)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl2_${BUILD_ID} undertow-scenario'
sh 'bash test/plugin/run.sh undertow-scenario'
}
}

stage('customize-scenario (1)') {
steps {
sh 'bash test/plugin/run.sh customize-scenario'
}
}
}
Expand All @@ -150,7 +163,7 @@ pipeline {

post {
cleanup {
sh 'bash test/plugin/run.sh --build_id=wl2_${BUILD_ID} --cleanup'
sh 'bash test/plugin/run.sh --cleanup'
deleteDir()
}
}
Expand Down
19 changes: 10 additions & 9 deletions Jenkinsfile-Agent-Test-3
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pipeline {
}

environment {
BUILD_NO="wl3_${BUILD_ID}"
MAVEN_OPTS = '-Dmaven.repo.local=.m2/repository -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx3g'
}

Expand Down Expand Up @@ -63,7 +64,7 @@ pipeline {
}
}
steps {
sh './mvnw -f test/plugin/pom.xml clean package -DskipTests -Dbuild_id=wl3_${BUILD_ID} docker:build'
sh './mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build'
}
}
stage('Test Cases Report (149)') {
Expand All @@ -83,27 +84,27 @@ pipeline {
stages {
stage('kafka 0.11.0.0-2.3.0 (16)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl3_${BUILD_ID} kafka-scenario'
sh 'bash test/plugin/run.sh kafka-scenario'
}
}
stage('canal 1.0.24-1.1.2 (5)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl3_${BUILD_ID} canal-scenario'
sh 'bash test/plugin/run.sh canal-scenario'
}
}
stage('sofarpc 5.4.0-5.6.2 (23)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl3_${BUILD_ID} sofarpc-scenario'
sh 'bash test/plugin/run.sh sofarpc-scenario'
}
}
stage('mongodb 3.4.0-3.11.1 (17)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl3_${BUILD_ID} mongodb-3.x-scenario'
sh 'bash test/plugin/run.sh mongodb-3.x-scenario'
}
}
stage('elasticsearch 5.x (3)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl3_${BUILD_ID} elasticsearch-5.x-scenario'
sh 'bash test/plugin/run.sh elasticsearch-5.x-scenario'
}
}
}
Expand All @@ -112,12 +113,12 @@ pipeline {
stages {
stage('postgresql 9.2.x-9.4.x (36)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl3_${BUILD_ID} postgresql-scenario'
sh 'bash test/plugin/run.sh postgresql-scenario'
}
}
stage('postgresql-9.4.1207+ (49)') {
steps {
sh 'bash test/plugin/run.sh --build_id=wl3_${BUILD_ID} postgresql-above9.4.1207-scenario'
sh 'bash test/plugin/run.sh postgresql-above9.4.1207-scenario'
}
}
}
Expand All @@ -128,7 +129,7 @@ pipeline {

post {
cleanup {
sh 'bash test/plugin/run.sh --build_id=wl3_${BUILD_ID} --cleanup'
sh 'bash test/plugin/run.sh --cleanup'
deleteDir()
}
}
Expand Down
6 changes: 3 additions & 3 deletions apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-core-execute</artifactId>
<version>[4.0.0-RC1,5.0.0)</version>
<version>4.0.0-RC2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-core</artifactId>
<version>[4.0.0-RC1,5.0.0)</version>
<version>4.0.0-RC2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-proxy-frontend-core</artifactId>
<version>[4.0.0-RC1,5.0.0)</version>
<version>4.0.0-RC2</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion test/plugin/containers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<artifactId>docker-maven-plugin</artifactId>
<version>${docker-maven-plugin.version}</version>
<configuration>
<imageTags>${build_id}</imageTags>
<imageTags>${BUILD_NO}</imageTags>
<imageName>skywalking/${project.name}</imageName>
<dockerDirectory>${project.basedir}/docker</dockerDirectory>
<skipDocker>${skip.docker}</skipDocker>
Expand Down
18 changes: 4 additions & 14 deletions test/plugin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ home="$(cd "$(dirname $0)"; pwd)"
scenario_name=""
parallel_run_size=1
force_build="off"
build_id="local"
cleanup="off"

mvnw=${home}/../../mvnw
Expand All @@ -30,7 +29,6 @@ scenarios_home="${home}/scenarios"
print_help() {
echo "Usage: run.sh [OPTION] SCENARIO_NAME"
echo -e "\t-f, --force_build \t\t do force to build Plugin-Test tools and images"
echo -e "\t--build_id, \t\t\t specify Plugin_Test's image tag. Defalt: latest"
echo -e "\t--parallel_run_size, \t\t parallel size of test cases. Default: 1"
echo -e "\t--cleanup, \t\t\t remove the related images and directories"
}
Expand All @@ -47,14 +45,6 @@ parse_commandline() {
--cleanup)
cleanup="on"
;;
--build_id)
test $# -lt 2 && exitWithMessage "Missing value for the optional argument '$_key'."
build_id="$2"
shift
;;
--build_id=*)
build_id="${_key##--build_id=}"
;;
--parallel_run_size)
test $# -lt 2 && exitWithMessage "Missing value for the optional argument '$_key'."
parallel_run_size="$2"
Expand Down Expand Up @@ -105,7 +95,7 @@ waitForAvailable() {
}

do_cleanup() {
images=$(docker images -q "skywalking/agent-test-*:${build_id}")
images=$(docker images -q "skywalking/agent-test-*:${BUILD_NO:=local}")
[[ -n "${images}" ]] && docker rmi -f ${images}
images=$(docker images -qf "dangling=true")
[[ -n "${images}" ]] && docker rmi -f ${images}
Expand Down Expand Up @@ -146,7 +136,7 @@ parse_commandline "$@"

if [[ "$cleanup" == "on" ]]; then
do_cleanup
exit 0
[[ -z "${scenario_name}" ]] && exit 0
fi

test -z "$scenario_name" && exitWithMessage "Missing value for the scenario argument"
Expand All @@ -155,7 +145,7 @@ if [[ ! -d ${agent_home} ]]; then
echo "[WARN] SkyWalking Agent not exists"
${mvnw} -f ${home}/../../pom.xml -Pagent -DskipTests clean package
fi
[[ "$force_build" == "on" ]] && ${mvnw} -f ${home}/pom.xml clean package -DskipTests -Dbuild_id=${build_id} docker:build
[[ "$force_build" == "on" ]] && ${mvnw} -f ${home}/pom.xml clean package -DskipTests docker:build

workspace="${home}/workspace/${scenario_name}"
task_state_house="${workspace}/.states"
Expand Down Expand Up @@ -215,7 +205,7 @@ do
-Dscenario.version=${version} \
-Doutput.dir=${case_work_base} \
-Dagent.dir=${_agent_home} \
-Ddocker.image.version=${build_id} \
-Ddocker.image.version=${BUILD_NO:=local} \
${plugin_runner_helper} 1>${case_work_logs_dir}/helper.log

[[ $? -ne 0 ]] && exitWithMessage "${testcase_name}, generate script failure!"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public String dockerImageVersion() {

@Override
public String dockerContainerName() {
return scenarioName() + "-" + scenarioVersion() + "-" + dockerImageVersion();
return (scenarioName() + "-" + scenarioVersion() + "-" + dockerImageVersion()).toLowerCase();
}

@Override public String scenarioHome() {
Expand Down
Loading

0 comments on commit 5659a5f

Please sign in to comment.