Skip to content

Commit

Permalink
Configured kokoro tests for CI and presubmit testing. (#898)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtisvg authored and lesv committed Oct 26, 2017
1 parent 02130ca commit 86b0293
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 7 deletions.
8 changes: 6 additions & 2 deletions .kokoro/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@

# 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.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java"
}

22 changes: 22 additions & 0 deletions .kokoro/continuous.cfg
Original file line number Diff line number Diff line change
@@ -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"
}

6 changes: 2 additions & 4 deletions .kokoro/system_tests.cfg → .kokoro/periodic.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

22 changes: 22 additions & 0 deletions .kokoro/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -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"
}

4 changes: 3 additions & 1 deletion .kokoro/system_tests.sh → .kokoro/tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)"

Expand Down

0 comments on commit 86b0293

Please sign in to comment.