Skip to content

Commit 86b0293

Browse files
kurtisvglesv
authored andcommitted
Configured kokoro tests for CI and presubmit testing. (#898)
1 parent 02130ca commit 86b0293

File tree

5 files changed

+55
-7
lines changed

5 files changed

+55
-7
lines changed

.kokoro/common.cfg

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@
1414

1515
# Format: //devtools/kokoro/config/proto/build.proto
1616

17-
# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR}
17+
# Download secrets from Cloud Storage.
18+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java-docs-samples"
19+
20+
# Download trampoline resources.
1821
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
1922

20-
# All builds use the trampoline script to run in docker.
23+
# Use the trampoline script to run in docker.
2124
build_file: "java-docs-samples/.kokoro/trampoline.sh"
2225

2326
# Configure the docker image for kokoro-trampoline.
2427
env_vars: {
2528
key: "TRAMPOLINE_IMAGE"
2629
value: "gcr.io/cloud-devrel-kokoro-resources/java"
2730
}
31+

.kokoro/continuous.cfg

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2017 Google Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Format: //devtools/kokoro/config/proto/build.proto
16+
17+
# Tell trampoline which tests to run.
18+
env_vars: {
19+
key: "TRAMPOLINE_BUILD_FILE"
20+
value: "github/java-docs-samples/.kokoro/tests/run_tests.sh"
21+
}
22+

.kokoro/system_tests.cfg renamed to .kokoro/periodic.cfg

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414

1515
# Format: //devtools/kokoro/config/proto/build.proto
1616

17-
# Download secrets from Cloud Storage.
18-
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java-docs-samples"
19-
2017
# Tell the trampoline which build file to use.
2118
env_vars: {
2219
key: "TRAMPOLINE_BUILD_FILE"
23-
value: "github/java-docs-samples/.kokoro/system_tests.sh"
20+
value: "github/java-docs-samples/.kokoro/tests/run_tests.sh"
2421
}
22+

.kokoro/presubmit.cfg

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2017 Google Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Format: //devtools/kokoro/config/proto/build.proto
16+
17+
# Tell the trampoline which build file to use.
18+
env_vars: {
19+
key: "TRAMPOLINE_BUILD_FILE"
20+
value: "github/java-docs-samples/.kokoro/tests/run_tests.sh"
21+
}
22+

.kokoro/system_tests.sh renamed to .kokoro/tests/run_tests.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ function TestIt() {
4444
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-acct.json
4545
export GOOGLE_CLOUD_PROJECT=java-docs-samples-testing
4646
export PATH=/google-cloud-sdk/bin:$PATH
47+
source ${KOKORO_GFILE_DIR}/aws-secrets.sh
4748

4849
echo "******** Environment *********"
4950
env
@@ -65,7 +66,8 @@ gcloud config list
6566

6667
echo "******** build everything ********"
6768
cd github/java-docs-samples
68-
mvn -B --fail-at-end clean verify -Dbigtable.projectID="${GOOGLE_CLOUD_PROJECT}" \
69+
mvn -B --fail-at-end clean verify -Dfile.encoding="UTF-16" \
70+
-Dbigtable.projectID="${GOOGLE_CLOUD_PROJECT}" \
6971
-Dbigtable.instanceID=instance | \
7072
grep -E -v "(^\[INFO\] Download|^\[INFO\].*skipping)"
7173

0 commit comments

Comments
 (0)