Disable elasticsearch tests in Gerrit-CI builds
Because of recent instability, the elasticsearch tests are
blocking the CI pipeline and making the build fail for timeout.
Disable all the tests flagged with 'elastic' on the stable-2.16
branch, until a solution is found.
Bug: Issue 13474
Change-Id: I888d9ffe544b3c3725df6701a98356d608fa4793
diff --git a/jenkins/gerrit-bazel-build-plugin-branch.sh b/jenkins/gerrit-bazel-build-plugin-branch.sh
index 10274d1..98c9012 100644
--- a/jenkins/gerrit-bazel-build-plugin-branch.sh
+++ b/jenkins/gerrit-bazel-build-plugin-branch.sh
@@ -24,12 +24,18 @@
bazelisk version
bazelisk build $BAZEL_OPTS --spawn_strategy=standalone --genrule_strategy=standalone $TARGETS
+TEST_TAG_FILTERS="-flaky"
+if [ "{branch}" == "stable-2.16" ]
+then
+ TEST_TAG_FILTERS="$TEST_TAG_FILTERS,-elastic"
+fi
+
BAZEL_OPTS="$BAZEL_OPTS --spawn_strategy=standalone --genrule_strategy=standalone \
--test_output errors \
--test_summary detailed --flaky_test_attempts 3 \
--test_verbose_timeout_warnings --build_tests_only \
--test_timeout 3600 \
- --test_tag_filters=-flaky \
+ --test_tag_filters=$TEST_TAG_FILTERS \
--test_env DOCKER_HOST=$DOCKER_HOST"
bazelisk test $BAZEL_OPTS //tools/bzl:always_pass_test plugins/{name}/...
diff --git a/jenkins/gerrit-bazel-test.sh b/jenkins/gerrit-bazel-test.sh
index 0ac68c3..0b92137 100755
--- a/jenkins/gerrit-bazel-test.sh
+++ b/jenkins/gerrit-bazel-test.sh
@@ -3,12 +3,18 @@
cd gerrit
. set-java.sh 8
+TEST_TAG_FILTERS="-flaky"
+if [ "{branch}" == "stable-2.16" ]
+then
+ TEST_TAG_FILTERS="$TEST_TAG_FILTERS,-elastic"
+fi
+
export BAZEL_OPTS="$BAZEL_OPTS --spawn_strategy=standalone --genrule_strategy=standalone \
--test_output errors \
--test_summary detailed --flaky_test_attempts 3 \
--test_verbose_timeout_warnings --build_tests_only \
--test_timeout 3600 \
- --test_tag_filters=-flaky \
+ --test_tag_filters=$TEST_TAG_FILTERS \
--test_env DOCKER_HOST=$DOCKER_HOST"
export WCT_HEADLESS_MODE=1
diff --git a/jenkins/gerrit-bazel-verifier-test.sh b/jenkins/gerrit-bazel-verifier-test.sh
index 8583d9f..9f5ead5 100755
--- a/jenkins/gerrit-bazel-verifier-test.sh
+++ b/jenkins/gerrit-bazel-verifier-test.sh
@@ -7,20 +7,18 @@
echo "Test with mode=$MODE"
echo '----------------------------------------------'
-case $TARGET_BRANCH in
- stable-2.*)
- TEST_TAG_FILTER="-flaky,-elastic"
- ;;
- *)
- TEST_TAG_FILTER="-flaky"
-esac
+TEST_TAG_FILTERS="-flaky"
+if [ "$TARGET_BRANCH" == "stable-2.16" ]
+then
+ TEST_TAG_FILTERS="$TEST_TAG_FILTERS,-elastic"
+fi
export BAZEL_OPTS="$BAZEL_OPTS --spawn_strategy=standalone --genrule_strategy=standalone \
--test_output errors \
--test_summary detailed --flaky_test_attempts 3 \
--test_verbose_timeout_warnings --build_tests_only \
--test_timeout 3600 \
- --test_tag_filters=$TEST_TAG_FILTER \
+ --test_tag_filters=$TEST_TAG_FILTERS \
--test_env DOCKER_HOST=$DOCKER_HOST"
export WCT_HEADLESS_MODE=1