wu-sheng commented on a change in pull request #3648: Add Jenkinsfile-E2E using 
MySQL provider.
URL: https://github.com/apache/skywalking/pull/3648#discussion_r336769031
 
 

 ##########
 File path: test/e2e/run.sh
 ##########
 @@ -59,8 +68,25 @@ do
   # Some of the tests will modify files in the distribution folder, e.g. 
cluster test will modify the application.yml
   # so we give each test a separate distribution folder here
   mkdir -p "$test_case" && tar -zxf dist/apache-skywalking-apm-bin.tar.gz -C 
"$test_case"
-
-  ./mvnw -Dbuild.id="${BUILD_ID:-local}" 
-De2e.container.version="${E2E_VERSION}" 
-Dsw.home="${base_dir}/$test_case/apache-skywalking-apm-bin" -f 
test/e2e/pom.xml -pl "$test_case" -am verify
+  
+   sky_home_dir="${base_dir}/$test_case/apache-skywalking-apm-bin"
+  
+  ./mvnw -Dbuild.id="${BUILD_ID:-local}" 
-De2e.container.version="${E2E_VERSION}" -Dsw.home="${sky_home_dir}" -f 
test/e2e/pom.xml -pl "$test_case" -am verify
+    
+  if ${use_mysql} -eq 1; then
+      echo "MySQL database is storage provider..."
+      
+      # Download MySQL connector.
+      curl ${MYSQL_URL} > "${sky_home_dir}/oap-libs/${MYSQL_DRIVER}"
+      [[ $? -ne 0 ]] && echo "Fail to download ${MYSQL_DRIVER}." && exit 1
+      
+      # Modify application.yml to set MySQL as storage provider.
+      cat "${sky_home_dir}/conf/application.yml" | sed 
'/elasticsearch/,/mysql/d' | sed "/storage:/a \  mysql:" | sed 
"/storage:/,/receiver-sharing-server:/s/#//" > ${TMP_APP_YML}
+      cat ${TMP_APP_YML} > "${sky_home_dir}/conf/application.yml"
+      rm -f ${TMP_APP_YML}
+  fi
+  
+  ./mvnw -Dbuild.id="${BUILD_ID:-local}" -Dsw.home="${sky_home_dir}" -f 
test/e2e/pom.xml -pl "$test_case" -am verify
 
 Review comment:
   Could tests be expected failure?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to