From 7eacda8c945955f9ea34bffbc9738c210084e399 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 19 May 2022 21:18:12 +0000 Subject: [PATCH] feat: add build scripts for native image testing in Java 17 (#1440) (#454) Source-Link: https://github.com/googleapis/synthtool/commit/505ce5a7edb58bf6d9d4de10b4bb4e81000ae324 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:2567a120ce90fadb6201999b87d649d9f67459de28815ad239bce9ebfaa18a74 --- java-workflows/.github/.OwlBot.lock.yaml | 4 +-- java-workflows/.kokoro/build.sh | 5 +++ .../.kokoro/presubmit/graalvm-native-17.cfg | 33 +++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 java-workflows/.kokoro/presubmit/graalvm-native-17.cfg diff --git a/java-workflows/.github/.OwlBot.lock.yaml b/java-workflows/.github/.OwlBot.lock.yaml index f60d774937f6..a79f06271b60 100644 --- a/java-workflows/.github/.OwlBot.lock.yaml +++ b/java-workflows/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:fc52b202aa298a50a12c64efd04fea3884d867947effe2fa85382a246c09e813 -# created: 2022-04-06T16:30:03.627422514Z + digest: sha256:2567a120ce90fadb6201999b87d649d9f67459de28815ad239bce9ebfaa18a74 +# created: 2022-05-19T15:12:45.278246753Z diff --git a/java-workflows/.kokoro/build.sh b/java-workflows/.kokoro/build.sh index 055738e080ce..326130b291d0 100755 --- a/java-workflows/.kokoro/build.sh +++ b/java-workflows/.kokoro/build.sh @@ -74,6 +74,11 @@ graalvm) mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test RETURN_CODE=$? ;; +graalvm17) + # Run Unit and Integration Tests with Native Image + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test + RETURN_CODE=$? + ;; samples) SAMPLES_DIR=samples # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. diff --git a/java-workflows/.kokoro/presubmit/graalvm-native-17.cfg b/java-workflows/.kokoro/presubmit/graalvm-native-17.cfg new file mode 100644 index 000000000000..a3f7fb9d4943 --- /dev/null +++ b/java-workflows/.kokoro/presubmit/graalvm-native-17.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/graalvm17" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvm17" +} + +# 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" +} \ No newline at end of file