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

 ##########
 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?
   
   Yes definitely
   
   > Sorry, should i replace Line#89 with Line#74 ?
   
   I think so
   
   > I am confused about line89 and 74. Why maven run twice?
   
   Line#74 is my changes in last PR, line#89 is produced by conflict merging? 
@tristaZero 
   
   > ..en.. Can you make sure whether Line#74 is what you want? Maybe i 
mistaked the Line#74 and #89, only one of which is needed, is it right?
   
   Line#74 is what I want, refer to the master branch

----------------------------------------------------------------
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