Skip to content

Commit

Permalink
Add Kokoro CI config (googleapis#3664)
Browse files Browse the repository at this point in the history
* 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.

* Temporarily comment out the LoggingAppender default resource test.

The default depends on the execution environment (GCE vs. locally) and
Kokoro tests run on GCE.

* Clean up debug output

* Add continuous build configs

* Fix the java10 build images to use Java 10, not 11
  • Loading branch information
chingor13 authored Sep 13, 2018
1 parent e855d48 commit 1d7b95f
Show file tree
Hide file tree
Showing 49 changed files with 1,024 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .kokoro/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:: See documentation in type-shell-output.bat
"C:\Program Files\Git\bin\bash.exe" github/google-cloud-java/.kokoro/build.sh
43 changes: 43 additions & 0 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash
# Copyright 2018 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.

set -eo pipefail

cd github/google-cloud-java/

# Print out Java version
java -version
echo $JOB_TYPE

mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V

# prepend Kokoro root directory onto GOOGLE_APPLICATION_CREDENTIALS path
if [ ! -z "$GOOGLE_APPLICATION_CREDENTIALS" ]; then
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS}
fi

case $JOB_TYPE in
test)
mvn test -B
;;
javadoc)
mvn javadoc:javadoc javadoc:test-javadoc
;;
integration)
./utilities/verify_single_it.sh $INTEGRATION_TEST_ARGS
;;
*)
;;
esac
13 changes: 13 additions & 0 deletions .kokoro/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR}
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# All builds use the trampoline script to run in docker.
build_file: "google-auth-library-java/.kokoro/trampoline.sh"

# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-auth-library-java/.kokoro/build.sh"
}
27 changes: 27 additions & 0 deletions .kokoro/continuous/bigquery-it.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "INTEGRATION_TEST_ARGS"
value: "google-cloud-clients/google-cloud-bigquery"
}

env_vars: {
key: "JOB_TYPE"
value: "integration"
}

env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_it_service_account"
}
27 changes: 27 additions & 0 deletions .kokoro/continuous/bigtable-it.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "INTEGRATION_TEST_ARGS"
value: "google-cloud-clients/google-cloud-bigtable -Dbigtable.env=prod -Dbigtable.table=projects/gcloud-devel/instances/google-cloud-bigtable/tables/integration-tests"
}

env_vars: {
key: "JOB_TYPE"
value: "integration"
}

env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_it_service_account"
}
27 changes: 27 additions & 0 deletions .kokoro/continuous/bigtableadmin-it.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "INTEGRATION_TEST_ARGS"
value: "google-cloud-clients/google-cloud-bigtable-admin -Dbigtable.instance=projects/gcloud-devel/instances/google-cloud-bigtable"
}

env_vars: {
key: "JOB_TYPE"
value: "integration"
}

env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_it_service_account"
}
46 changes: 46 additions & 0 deletions .kokoro/continuous/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "google-cloud-java/.kokoro/trampoline.sh"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-java/.kokoro/build.sh"
}

env_vars: {
key: "JOB_TYPE"
value: "test"
}

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "java_it_service_account"
# TODO(chingor): remove this after secrets have globally propagated
backend_type: FASTCONFIGPUSH
}
}
}

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "java_firestore_it_service_account"
# TODO(chingor): remove this after secrets have globally propagated
backend_type: FASTCONFIGPUSH
}
}
}
27 changes: 27 additions & 0 deletions .kokoro/continuous/compute-it.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "INTEGRATION_TEST_ARGS"
value: "google-cloud-clients/google-cloud-compute"
}

env_vars: {
key: "JOB_TYPE"
value: "integration"
}

env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_it_service_account"
}
27 changes: 27 additions & 0 deletions .kokoro/continuous/datastore-it.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "INTEGRATION_TEST_ARGS"
value: "google-cloud-clients/google-cloud-datastore"
}

env_vars: {
key: "JOB_TYPE"
value: "integration"
}

env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_it_service_account"
}
27 changes: 27 additions & 0 deletions .kokoro/continuous/dns-it.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "INTEGRATION_TEST_ARGS"
value: "google-cloud-clients/google-cloud-dns"
}

env_vars: {
key: "JOB_TYPE"
value: "integration"
}

env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_it_service_account"
}
27 changes: 27 additions & 0 deletions .kokoro/continuous/firestore-it.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "INTEGRATION_TEST_ARGS"
value: "google-cloud-clients/google-cloud-firestore"
}

env_vars: {
key: "JOB_TYPE"
value: "integration"
}

env_vars: {
key: "GCLOUD_PROJECT"
value: "java-review"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_firestore_it_service_account"
}
7 changes: 7 additions & 0 deletions .kokoro/continuous/java10.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java10"
}
7 changes: 7 additions & 0 deletions .kokoro/continuous/java11.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
}
7 changes: 7 additions & 0 deletions .kokoro/continuous/java7.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java7"
}
3 changes: 3 additions & 0 deletions .kokoro/continuous/java8-win.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "google-cloud-java/.kokoro/build.bat"
7 changes: 7 additions & 0 deletions .kokoro/continuous/java8.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}
12 changes: 12 additions & 0 deletions .kokoro/continuous/javadoc.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java7"
}

env_vars: {
key: "JOB_TYPE"
value: "javadoc"
}
27 changes: 27 additions & 0 deletions .kokoro/continuous/logging-it.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "INTEGRATION_TEST_ARGS"
value: "google-cloud-clients/google-cloud-logging"
}

env_vars: {
key: "JOB_TYPE"
value: "integration"
}

env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "keystore/73713_java_it_service_account"
}
Loading

0 comments on commit 1d7b95f

Please sign in to comment.