Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

Commit

Permalink
build(java): Introduce Native Image testing build script changes (#834)
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] committed Oct 18, 2021
1 parent 01d30a9 commit f9b0b39
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/.OwlBot.lock.yaml
@@ -1,3 +1,3 @@
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
digest: sha256:13b7387edb404234610d30473ac48210ae7fe42a136335ee2b2f8a07c4c7f6a5
digest: sha256:d4b2141d65566523dfd523f63c6e6899ab1281463bce182a9f600e74b0511875
5 changes: 5 additions & 0 deletions .kokoro/build.sh
Expand Up @@ -69,6 +69,11 @@ integration)
verify
RETURN_CODE=$?
;;
graalvm)
# Run Unit and Integration Tests with Native Image
mvn test -Pnative -Penable-integration-tests
RETURN_CODE=$?
;;
samples)
SAMPLES_DIR=samples
# only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise.
Expand Down
33 changes: 33 additions & 0 deletions .kokoro/presubmit/graalvm-native.cfg
@@ -0,0 +1,33 @@
# 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/graalvm"
}

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

# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

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

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

env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -200,6 +200,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-translate/tre
| Translate Text With Glossary | [source code](https://github.com/googleapis/java-translate/blob/main/samples/snippets/src/main/java/com/example/translate/TranslateTextWithGlossary.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-translate&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/translate/TranslateTextWithGlossary.java) |
| Translate Text With Glossary And Model | [source code](https://github.com/googleapis/java-translate/blob/main/samples/snippets/src/main/java/com/example/translate/TranslateTextWithGlossaryAndModel.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-translate&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/translate/TranslateTextWithGlossaryAndModel.java) |
| Translate Text With Model | [source code](https://github.com/googleapis/java-translate/blob/main/samples/snippets/src/main/java/com/example/translate/TranslateTextWithModel.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-translate&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/translate/TranslateTextWithModel.java) |
| Batch Translate Document | [source code](https://github.com/googleapis/java-translate/blob/main/samples/snippets/src/main/java/com/example/translatev3beta1/BatchTranslateDocument.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-translate&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/translatev3beta1/BatchTranslateDocument.java) |
| Translate Document | [source code](https://github.com/googleapis/java-translate/blob/main/samples/snippets/src/main/java/com/example/translatev3beta1/TranslateDocument.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-translate&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/translatev3beta1/TranslateDocument.java) |



Expand Down

0 comments on commit f9b0b39

Please sign in to comment.