Skip to content

Commit 01fc598

Browse files
committed
Add presubmit test configs
Add windows test config and add credentials for integration tests Invert the env var check Use fastconfigpush for faster keystore propagation Fix missing ;; in build script Allow LoggingAppender default options test to pass locally and on GCE Temporarily comment out the resource test Also grab surefire reports Fix java8-win bat path credentials path debug Set GCLOUD_PROJECT environment variable Add Java 11 test config try uploading surefire results as sponge_log.xml Fix BigTable IT args Temporarily test Java 11 Upload integration test output as sponge_log.xml too Revert "Temporarily comment out the resource test" This reverts commit f01bdbd. Revert "Allow LoggingAppender default options test to pass locally and on GCE" This reverts commit 90e28af.
1 parent 8f44a9a commit 01fc598

28 files changed

+558
-0
lines changed

.kokoro/build.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:: See documentation in type-shell-output.bat
2+
3+
"C:\Program Files\Git\bin\bash.exe" github/google-cloud-java/.kokoro/build.sh

.kokoro/build.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash
2+
# Copyright 2018 Google Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -eo pipefail
17+
18+
cd github/google-cloud-java/
19+
20+
# Print out Java version
21+
java -version
22+
echo $JOB_TYPE
23+
24+
mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
25+
26+
# prepend Kokoro root directory onto GOOGLE_APPLICATION_CREDENTIALS path
27+
if [ ! -z "$GOOGLE_APPLICATION_CREDENTIALS" ]; then
28+
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS}
29+
fi
30+
31+
case $JOB_TYPE in
32+
test)
33+
mvn test -B
34+
;;
35+
javadoc)
36+
mvn javadoc:javadoc javadoc:test-javadoc
37+
;;
38+
integration)
39+
./utilities/verify_single_it.sh $INTEGRATION_TEST_ARGS
40+
;;
41+
*)
42+
;;
43+
esac

.kokoro/common.cfg

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR}
4+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
5+
6+
# All builds use the trampoline script to run in docker.
7+
build_file: "google-auth-library-java/.kokoro/trampoline.sh"
8+
9+
# Tell the trampoline which build file to use.
10+
env_vars: {
11+
key: "TRAMPOLINE_BUILD_FILE"
12+
value: "github/google-auth-library-java/.kokoro/build.sh"
13+
}

.kokoro/presubmit/bigquery-it.cfg

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
7+
}
8+
9+
env_vars: {
10+
key: "INTEGRATION_TEST_ARGS"
11+
value: "google-cloud-clients/google-cloud-bigquery"
12+
}
13+
14+
env_vars: {
15+
key: "JOB_TYPE"
16+
value: "integration"
17+
}
18+
19+
env_vars: {
20+
key: "GCLOUD_PROJECT"
21+
value: "gcloud-devel"
22+
}
23+
24+
env_vars: {
25+
key: "GOOGLE_APPLICATION_CREDENTIALS"
26+
value: "keystore/73713_java_it_service_account"
27+
}

.kokoro/presubmit/bigtable-it.cfg

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
7+
}
8+
9+
env_vars: {
10+
key: "INTEGRATION_TEST_ARGS"
11+
value: "google-cloud-clients/google-cloud-bigtable -Dbigtable.env=prod -Dbigtable.table=projects/gcloud-devel/instances/google-cloud-bigtable/tables/integration-tests"
12+
}
13+
14+
env_vars: {
15+
key: "JOB_TYPE"
16+
value: "integration"
17+
}
18+
19+
env_vars: {
20+
key: "GCLOUD_PROJECT"
21+
value: "gcloud-devel"
22+
}
23+
24+
env_vars: {
25+
key: "GOOGLE_APPLICATION_CREDENTIALS"
26+
value: "keystore/73713_java_it_service_account"
27+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
7+
}
8+
9+
env_vars: {
10+
key: "INTEGRATION_TEST_ARGS"
11+
value: "google-cloud-clients/google-cloud-bigtable-admin -Dbigtable.instance=projects/gcloud-devel/instances/google-cloud-bigtable"
12+
}
13+
14+
env_vars: {
15+
key: "JOB_TYPE"
16+
value: "integration"
17+
}
18+
19+
env_vars: {
20+
key: "GCLOUD_PROJECT"
21+
value: "gcloud-devel"
22+
}
23+
24+
env_vars: {
25+
key: "GOOGLE_APPLICATION_CREDENTIALS"
26+
value: "keystore/73713_java_it_service_account"
27+
}

.kokoro/presubmit/common.cfg

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Build logs will be here
4+
action {
5+
define_artifacts {
6+
regex: "**/*sponge_log.xml"
7+
}
8+
}
9+
10+
# Download trampoline resources.
11+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
12+
13+
# Use the trampoline script to run in docker.
14+
build_file: "google-cloud-java/.kokoro/trampoline.sh"
15+
16+
env_vars: {
17+
key: "TRAMPOLINE_BUILD_FILE"
18+
value: "github/google-cloud-java/.kokoro/build.sh"
19+
}
20+
21+
env_vars: {
22+
key: "JOB_TYPE"
23+
value: "test"
24+
}
25+
26+
before_action {
27+
fetch_keystore {
28+
keystore_resource {
29+
keystore_config_id: 73713
30+
keyname: "java_it_service_account"
31+
# TODO(chingor): remove this after secrets have globally propagated
32+
backend_type: FASTCONFIGPUSH
33+
}
34+
}
35+
}
36+
37+
before_action {
38+
fetch_keystore {
39+
keystore_resource {
40+
keystore_config_id: 73713
41+
keyname: "java_firestore_it_service_account"
42+
# TODO(chingor): remove this after secrets have globally propagated
43+
backend_type: FASTCONFIGPUSH
44+
}
45+
}
46+
}

.kokoro/presubmit/compute-it.cfg

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
7+
}
8+
9+
env_vars: {
10+
key: "INTEGRATION_TEST_ARGS"
11+
value: "google-cloud-clients/google-cloud-compute"
12+
}
13+
14+
env_vars: {
15+
key: "JOB_TYPE"
16+
value: "integration"
17+
}
18+
19+
env_vars: {
20+
key: "GCLOUD_PROJECT"
21+
value: "gcloud-devel"
22+
}
23+
24+
env_vars: {
25+
key: "GOOGLE_APPLICATION_CREDENTIALS"
26+
value: "keystore/73713_java_it_service_account"
27+
}

.kokoro/presubmit/datastore-it.cfg

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
7+
}
8+
9+
env_vars: {
10+
key: "INTEGRATION_TEST_ARGS"
11+
value: "google-cloud-clients/google-cloud-datastore"
12+
}
13+
14+
env_vars: {
15+
key: "JOB_TYPE"
16+
value: "integration"
17+
}
18+
19+
env_vars: {
20+
key: "GCLOUD_PROJECT"
21+
value: "gcloud-devel"
22+
}
23+
24+
env_vars: {
25+
key: "GOOGLE_APPLICATION_CREDENTIALS"
26+
value: "keystore/73713_java_it_service_account"
27+
}

.kokoro/presubmit/dns-it.cfg

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
7+
}
8+
9+
env_vars: {
10+
key: "INTEGRATION_TEST_ARGS"
11+
value: "google-cloud-clients/google-cloud-dns"
12+
}
13+
14+
env_vars: {
15+
key: "JOB_TYPE"
16+
value: "integration"
17+
}
18+
19+
env_vars: {
20+
key: "GCLOUD_PROJECT"
21+
value: "gcloud-devel"
22+
}
23+
24+
env_vars: {
25+
key: "GOOGLE_APPLICATION_CREDENTIALS"
26+
value: "keystore/73713_java_it_service_account"
27+
}

.kokoro/presubmit/firestore-it.cfg

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
7+
}
8+
9+
env_vars: {
10+
key: "INTEGRATION_TEST_ARGS"
11+
value: "google-cloud-clients/google-cloud-firestore"
12+
}
13+
14+
env_vars: {
15+
key: "JOB_TYPE"
16+
value: "integration"
17+
}
18+
19+
env_vars: {
20+
key: "GCLOUD_PROJECT"
21+
value: "java-review"
22+
}
23+
24+
env_vars: {
25+
key: "GOOGLE_APPLICATION_CREDENTIALS"
26+
value: "keystore/73713_java_firestore_it_service_account"
27+
}

.kokoro/presubmit/java10.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
7+
}

.kokoro/presubmit/java11.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
7+
}

.kokoro/presubmit/java7.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java7"
7+
}

.kokoro/presubmit/java8-win.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
build_file: "google-cloud-java/.kokoro/build.bat"

.kokoro/presubmit/java8.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
7+
}

.kokoro/presubmit/javadoc.cfg

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java7"
7+
}
8+
9+
env_vars: {
10+
key: "JOB_TYPE"
11+
value: "javadoc"
12+
}

.kokoro/presubmit/logging-it.cfg

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
7+
}
8+
9+
env_vars: {
10+
key: "INTEGRATION_TEST_ARGS"
11+
value: "google-cloud-clients/google-cloud-logging"
12+
}
13+
14+
env_vars: {
15+
key: "JOB_TYPE"
16+
value: "integration"
17+
}
18+
19+
env_vars: {
20+
key: "GCLOUD_PROJECT"
21+
value: "gcloud-devel"
22+
}
23+
24+
env_vars: {
25+
key: "GOOGLE_APPLICATION_CREDENTIALS"
26+
value: "keystore/73713_java_it_service_account"
27+
}

0 commit comments

Comments
 (0)