diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg index 37c9f80ede8..537f3d23733 100644 --- a/.kokoro/common.cfg +++ b/.kokoro/common.cfg @@ -14,10 +14,13 @@ # Format: //devtools/kokoro/config/proto/build.proto -# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR} +# Download secrets from Cloud Storage. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java-docs-samples" + +# Download trampoline resources. gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" -# All builds use the trampoline script to run in docker. +# Use the trampoline script to run in docker. build_file: "java-docs-samples/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. @@ -25,3 +28,4 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java" } + diff --git a/.kokoro/continuous.cfg b/.kokoro/continuous.cfg new file mode 100644 index 00000000000..38af6c75c94 --- /dev/null +++ b/.kokoro/continuous.cfg @@ -0,0 +1,22 @@ +# Copyright 2017 Google Inc. +# +# 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. + +# Format: //devtools/kokoro/config/proto/build.proto + +# Tell trampoline which tests to run. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-docs-samples/.kokoro/tests/run_tests.sh" +} + diff --git a/.kokoro/system_tests.cfg b/.kokoro/periodic.cfg similarity index 80% rename from .kokoro/system_tests.cfg rename to .kokoro/periodic.cfg index fc2b31c776f..5531a830582 100644 --- a/.kokoro/system_tests.cfg +++ b/.kokoro/periodic.cfg @@ -14,11 +14,9 @@ # Format: //devtools/kokoro/config/proto/build.proto -# Download secrets from Cloud Storage. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java-docs-samples" - # Tell the trampoline which build file to use. env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-docs-samples/.kokoro/system_tests.sh" + value: "github/java-docs-samples/.kokoro/tests/run_tests.sh" } + diff --git a/.kokoro/presubmit.cfg b/.kokoro/presubmit.cfg new file mode 100644 index 00000000000..5531a830582 --- /dev/null +++ b/.kokoro/presubmit.cfg @@ -0,0 +1,22 @@ +# Copyright 2017 Google Inc. +# +# 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. + +# Format: //devtools/kokoro/config/proto/build.proto + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-docs-samples/.kokoro/tests/run_tests.sh" +} + diff --git a/.kokoro/system_tests.sh b/.kokoro/tests/run_tests.sh similarity index 96% rename from .kokoro/system_tests.sh rename to .kokoro/tests/run_tests.sh index ab9d81fb0bb..72d81fdeab3 100755 --- a/.kokoro/system_tests.sh +++ b/.kokoro/tests/run_tests.sh @@ -44,6 +44,7 @@ function TestIt() { export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-acct.json export GOOGLE_CLOUD_PROJECT=java-docs-samples-testing export PATH=/google-cloud-sdk/bin:$PATH +source ${KOKORO_GFILE_DIR}/aws-secrets.sh echo "******** Environment *********" env @@ -65,7 +66,8 @@ gcloud config list echo "******** build everything ********" cd github/java-docs-samples -mvn -B --fail-at-end clean verify -Dbigtable.projectID="${GOOGLE_CLOUD_PROJECT}" \ +mvn -B --fail-at-end clean verify -Dfile.encoding="UTF-16" \ + -Dbigtable.projectID="${GOOGLE_CLOUD_PROJECT}" \ -Dbigtable.instanceID=instance | \ grep -E -v "(^\[INFO\] Download|^\[INFO\].*skipping)"