From 7cc4633188ab6c46021a6c8f07621dbe778350ca Mon Sep 17 00:00:00 2001 From: DPE bot Date: Tue, 13 Feb 2018 09:49:48 -0800 Subject: [PATCH 1/5] Auto-update dependencies. --- appengine-java8/bigtable/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appengine-java8/bigtable/pom.xml b/appengine-java8/bigtable/pom.xml index 132cd4d7831..9013f11de05 100644 --- a/appengine-java8/bigtable/pom.xml +++ b/appengine-java8/bigtable/pom.xml @@ -46,7 +46,7 @@ limitations under the License. com.google.cloud.bigtable bigtable-hbase-1.x - 1.1.1 + 1.1.2 From b75f200d25800420d44fa7fbeea4e15015a50a9a Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent Date: Wed, 14 Feb 2018 11:12:33 -0800 Subject: [PATCH 2/5] Reduce noise in diff tests. --- .kokoro/tests/diff_tests.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.kokoro/tests/diff_tests.sh b/.kokoro/tests/diff_tests.sh index 5e15cf1ba1e..ec135a969f3 100755 --- a/.kokoro/tests/diff_tests.sh +++ b/.kokoro/tests/diff_tests.sh @@ -19,7 +19,7 @@ shopt -s globstar trap '' HUP # Update gcloud and check version -gcloud components update --quiet +gcloud components update --quiet --verbosity="error" echo -e "\n ********** GCLOUD INFO *********** \n" gcloud -v echo -e "\n ********** MAVEN INFO *********** \n" @@ -27,7 +27,7 @@ mvn -v echo -e "\n ********** GRADLE INFO *********** " gradle -v -# Setup required enviormental variables +# Setup required environmental variables export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-acct.json export GOOGLE_CLOUD_PROJECT=java-docs-samples-testing source ${KOKORO_GFILE_DIR}/aws-secrets.sh @@ -37,26 +37,29 @@ gcloud auth activate-service-account\ --key-file=$GOOGLE_APPLICATION_CREDENTIALS \ --project=$GOOGLE_CLOUD_PROJECT -echo -e "\n******************** CHECKING FOR AFFECTED FOLDERS ********************" +echo -e "\n******************** TESTING AFFECTED PROJECTS ********************" # Diff to find out what has changed from master cd github/java-docs-samples -find ./*/ -name pom.xml -print0 | sort -z | while read -d $'\0' file +find * -name pom.xml -print0 | sort -z | while read -d $'\0' file do - file=$(dirname "$file") - echo "------------------------------------------------------------" - echo "- checking $file" - echo "------------------------------------------------------------" - + # Navigate to project pushd "$file" > /dev/null set +e + # Has the project changed? git diff --quiet master.. . - RTN=$? + CHANGED=$? + # Skip parents so the projects aren't tested twice + PARENT=$(grep "" pom.xml -c) set -e # Check for changes to the current folder - if [ "$RTN" -eq 1 ]; then - echo -e "\n Change detected. Running tests. \n " + if [ "$CHANGED" -eq 1 ] && [ "$PARENT" -eq 0 ]; then + file=$(dirname "$file") + echo "------------------------------------------------------------" + echo "- testing $file" + echo "------------------------------------------------------------" + mvn -q --batch-mode --fail-at-end clean verify \ -Dfile.encoding="UTF-8" \ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ @@ -64,8 +67,6 @@ do -Dbigtable.projectID="${GOOGLE_CLOUD_PROJECT}" \ -Dbigtable.instanceID=instance echo -e " Tests complete. \n" - else - echo -e "\n NO change found. \n" fi popd > /dev/null From a0e426dd6d2432fd307b5f77c4beb7028e4a52ab Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent Date: Wed, 14 Feb 2018 11:25:14 -0800 Subject: [PATCH 3/5] Minor text fixes. --- .kokoro/tests/diff_tests.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.kokoro/tests/diff_tests.sh b/.kokoro/tests/diff_tests.sh index ec135a969f3..ffdefb61997 100755 --- a/.kokoro/tests/diff_tests.sh +++ b/.kokoro/tests/diff_tests.sh @@ -19,7 +19,7 @@ shopt -s globstar trap '' HUP # Update gcloud and check version -gcloud components update --quiet --verbosity="error" +gcloud components update --quiet 1> /dev/null echo -e "\n ********** GCLOUD INFO *********** \n" gcloud -v echo -e "\n ********** MAVEN INFO *********** \n" @@ -42,14 +42,15 @@ echo -e "\n******************** TESTING AFFECTED PROJECTS ********************" cd github/java-docs-samples find * -name pom.xml -print0 | sort -z | while read -d $'\0' file do - # Navigate to project + file=$(dirname "$file") pushd "$file" > /dev/null + set +e - # Has the project changed? + # Only tests changed projects git diff --quiet master.. . CHANGED=$? - # Skip parents so the projects aren't tested twice + # Only test leafs to prevent testing twice PARENT=$(grep "" pom.xml -c) set -e @@ -66,7 +67,7 @@ do -Dmaven.test.redirectTestOutputToFile=true \ -Dbigtable.projectID="${GOOGLE_CLOUD_PROJECT}" \ -Dbigtable.instanceID=instance - echo -e " Tests complete. \n" + echo -e "\n Tests complete. \n" fi popd > /dev/null From c3e79172afc863fffa0b0125dca0d447722e0ae4 Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent Date: Wed, 14 Feb 2018 11:41:25 -0800 Subject: [PATCH 4/5] --no-edit --- .kokoro/tests/diff_tests.sh | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.kokoro/tests/diff_tests.sh b/.kokoro/tests/diff_tests.sh index ffdefb61997..9a5ec6b914b 100755 --- a/.kokoro/tests/diff_tests.sh +++ b/.kokoro/tests/diff_tests.sh @@ -18,24 +18,6 @@ shopt -s globstar # We spin up some subprocesses. Don't kill them on hangup trap '' HUP -# Update gcloud and check version -gcloud components update --quiet 1> /dev/null -echo -e "\n ********** GCLOUD INFO *********** \n" -gcloud -v -echo -e "\n ********** MAVEN INFO *********** \n" -mvn -v -echo -e "\n ********** GRADLE INFO *********** " -gradle -v - -# Setup required environmental variables -export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-acct.json -export GOOGLE_CLOUD_PROJECT=java-docs-samples-testing -source ${KOKORO_GFILE_DIR}/aws-secrets.sh -source ${KOKORO_GFILE_DIR}/dlp_secrets.txt -# Activate service account -gcloud auth activate-service-account\ - --key-file=$GOOGLE_APPLICATION_CREDENTIALS \ - --project=$GOOGLE_CLOUD_PROJECT echo -e "\n******************** TESTING AFFECTED PROJECTS ********************" # Diff to find out what has changed from master @@ -56,7 +38,6 @@ do # Check for changes to the current folder if [ "$CHANGED" -eq 1 ] && [ "$PARENT" -eq 0 ]; then - file=$(dirname "$file") echo "------------------------------------------------------------" echo "- testing $file" echo "------------------------------------------------------------" From 92265b437fc17cfa147730c271480282722a88bc Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent Date: Wed, 14 Feb 2018 12:23:38 -0800 Subject: [PATCH 5/5] --no-edit --- .kokoro/tests/diff_tests.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.kokoro/tests/diff_tests.sh b/.kokoro/tests/diff_tests.sh index 9a5ec6b914b..e1819e2aaa9 100755 --- a/.kokoro/tests/diff_tests.sh +++ b/.kokoro/tests/diff_tests.sh @@ -18,6 +18,24 @@ shopt -s globstar # We spin up some subprocesses. Don't kill them on hangup trap '' HUP +# Update gcloud and check version +gcloud components update --quiet 1> /dev/null +echo -e "\n ********** GCLOUD INFO *********** \n" +gcloud -v +echo -e "\n ********** MAVEN INFO *********** \n" +mvn -v +echo -e "\n ********** GRADLE INFO *********** " +gradle -v + +# Setup required environmental variables +export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-acct.json +export GOOGLE_CLOUD_PROJECT=java-docs-samples-testing +source ${KOKORO_GFILE_DIR}/aws-secrets.sh +source ${KOKORO_GFILE_DIR}/dlp_secrets.txt +# Activate service account +gcloud auth activate-service-account\ + --key-file=$GOOGLE_APPLICATION_CREDENTIALS \ + --project=$GOOGLE_CLOUD_PROJECT echo -e "\n******************** TESTING AFFECTED PROJECTS ********************" # Diff to find out what has changed from master