Skip to content

Commit

Permalink
fix: runs sample tests in java 8 and java 11 (#345)
Browse files Browse the repository at this point in the history
Adds configuration files in kokoro to run sample tests in java 8 and java 11. 
These were added in the continuous, nightly and presubmit builds.
  • Loading branch information
thiagotnunes committed Jul 14, 2020
1 parent 1a4f4fd commit b547e31
Show file tree
Hide file tree
Showing 9 changed files with 126 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .kokoro/continuous/samples/common.cfg
@@ -0,0 +1,25 @@
# Format: //devtools/kokoro/config/proto/build.proto

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

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

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

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "java_it_service_account"
}
}
}
7 changes: 7 additions & 0 deletions .kokoro/continuous/samples/samples-java11.cfg
@@ -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/samples/samples-java8.cfg
@@ -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"
}
32 changes: 32 additions & 0 deletions .kokoro/nightly/samples/common.cfg
@@ -0,0 +1,32 @@
# Format: //devtools/kokoro/config/proto/build.proto

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

# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "java-docs-samples-testing"
}

env_vars: {
key: "GOOGLE_CLOUD_PROJECT"
value: "java-docs-samples-testing"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "secret_manager/java-docs-samples-service-account"
}

env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-docs-samples-service-account"
}

env_vars: {
key: "ENABLE_BUILD_COP"
value: "true"
}
7 changes: 7 additions & 0 deletions .kokoro/nightly/samples/samples-java11.cfg
@@ -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/nightly/samples/samples-java8.cfg
@@ -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"
}
27 changes: 27 additions & 0 deletions .kokoro/presubmit/samples/common.cfg
@@ -0,0 +1,27 @@
# Format: //devtools/kokoro/config/proto/build.proto

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

# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "java-docs-samples-testing"
}

env_vars: {
key: "GOOGLE_CLOUD_PROJECT"
value: "java-docs-samples-testing"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "secret_manager/java-docs-samples-service-account"
}

env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-docs-samples-service-account"
}
7 changes: 7 additions & 0 deletions .kokoro/presubmit/samples/samples-java11.cfg
@@ -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/presubmit/samples/samples-java8.cfg
@@ -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"
}

0 comments on commit b547e31

Please sign in to comment.