You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/10/18 05:34:40 UTC

[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #3648: Add Jenkinsfile-E2E using MySQL provider.

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

 ##########
 File path: test/e2e/run.sh
 ##########
 @@ -64,8 +73,23 @@ 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}" -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"
+  
+  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}
 
 Review comment:
   These won't actually work, because **the `application.yml` is modified inside the docker container just before the OAP backend starts**, 
   
   https://github.com/apache/skywalking/blob/bde6c137b70b10ceecc5c4ca53fecf99e263f57d/test/e2e/e2e-cluster/test-runner/src/docker/rc.d/rc0-prepare.sh#L23-L32
   
   so the changes here will be overrode.
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services