From 2a0594c934f19b4d82f57999eaba697a639061b6 Mon Sep 17 00:00:00 2001
From: Matt Kwong <mattkwong@google.com>
Date: Fri, 28 Jul 2017 09:49:45 -0700
Subject: [PATCH] Add bazel tests to Kokoro

---
 tools/internal_ci/linux/grpc_bazel.sh        | 25 ++++++++++++++++++++
 tools/internal_ci/linux/grpc_bazel_build.cfg | 23 ++++++++++++++++++
 tools/internal_ci/linux/grpc_bazel_test.cfg  | 23 ++++++++++++++++++
 3 files changed, 71 insertions(+)
 create mode 100755 tools/internal_ci/linux/grpc_bazel.sh
 create mode 100644 tools/internal_ci/linux/grpc_bazel_build.cfg
 create mode 100644 tools/internal_ci/linux/grpc_bazel_test.cfg

diff --git a/tools/internal_ci/linux/grpc_bazel.sh b/tools/internal_ci/linux/grpc_bazel.sh
new file mode 100755
index 0000000000..2b17fa849a
--- /dev/null
+++ b/tools/internal_ci/linux/grpc_bazel.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -ex
+
+# change to grpc repo root
+cd $(dirname $0)/../../..
+
+source tools/internal_ci/helper_scripts/prepare_build_linux_rc
+
+export DOCKERFILE_DIR=tools/dockerfile/test/bazel
+export DOCKER_RUN_SCRIPT=$BAZEL_SCRIPT
+exec tools/run_tests/dockerize/build_and_run_docker.sh
diff --git a/tools/internal_ci/linux/grpc_bazel_build.cfg b/tools/internal_ci/linux/grpc_bazel_build.cfg
new file mode 100644
index 0000000000..4d3a2ade5d
--- /dev/null
+++ b/tools/internal_ci/linux/grpc_bazel_build.cfg
@@ -0,0 +1,23 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_bazel.sh"
+timeout_mins: 60
+env_vars {
+  key: "BAZEL_SCRIPT"
+  value: "tools/jenkins/run_bazel_basic_in_docker.sh"
+}
diff --git a/tools/internal_ci/linux/grpc_bazel_test.cfg b/tools/internal_ci/linux/grpc_bazel_test.cfg
new file mode 100644
index 0000000000..46198b9600
--- /dev/null
+++ b/tools/internal_ci/linux/grpc_bazel_test.cfg
@@ -0,0 +1,23 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_bazel.sh"
+timeout_mins: 240
+env_vars {
+  key: "BAZEL_SCRIPT"
+  value: "tools/jenkins/run_bazel_full_in_docker.sh"
+}
-- 
GitLab