Skip to content

Commit b547e31

Browse files
authored
fix: runs sample tests in java 8 and java 11 (#345)
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.
1 parent 1a4f4fd commit b547e31

File tree

9 files changed

+126
-0
lines changed

9 files changed

+126
-0
lines changed

.kokoro/continuous/samples/common.cfg

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "JOB_TYPE"
5+
value: "samples"
6+
}
7+
8+
env_vars: {
9+
key: "GCLOUD_PROJECT"
10+
value: "gcloud-devel"
11+
}
12+
13+
env_vars: {
14+
key: "GOOGLE_APPLICATION_CREDENTIALS"
15+
value: "keystore/73713_java_it_service_account"
16+
}
17+
18+
before_action {
19+
fetch_keystore {
20+
keystore_resource {
21+
keystore_config_id: 73713
22+
keyname: "java_it_service_account"
23+
}
24+
}
25+
}
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+
}
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/nightly/samples/common.cfg

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "JOB_TYPE"
5+
value: "samples"
6+
}
7+
8+
# TODO: remove this after we've migrated all tests and scripts
9+
env_vars: {
10+
key: "GCLOUD_PROJECT"
11+
value: "java-docs-samples-testing"
12+
}
13+
14+
env_vars: {
15+
key: "GOOGLE_CLOUD_PROJECT"
16+
value: "java-docs-samples-testing"
17+
}
18+
19+
env_vars: {
20+
key: "GOOGLE_APPLICATION_CREDENTIALS"
21+
value: "secret_manager/java-docs-samples-service-account"
22+
}
23+
24+
env_vars: {
25+
key: "SECRET_MANAGER_KEYS"
26+
value: "java-docs-samples-service-account"
27+
}
28+
29+
env_vars: {
30+
key: "ENABLE_BUILD_COP"
31+
value: "true"
32+
}
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+
}
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/samples/common.cfg

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "JOB_TYPE"
5+
value: "samples"
6+
}
7+
8+
# TODO: remove this after we've migrated all tests and scripts
9+
env_vars: {
10+
key: "GCLOUD_PROJECT"
11+
value: "java-docs-samples-testing"
12+
}
13+
14+
env_vars: {
15+
key: "GOOGLE_CLOUD_PROJECT"
16+
value: "java-docs-samples-testing"
17+
}
18+
19+
env_vars: {
20+
key: "GOOGLE_APPLICATION_CREDENTIALS"
21+
value: "secret_manager/java-docs-samples-service-account"
22+
}
23+
24+
env_vars: {
25+
key: "SECRET_MANAGER_KEYS"
26+
value: "java-docs-samples-service-account"
27+
}
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+
}
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+
}

0 commit comments

Comments
 (0)