From 7520a54869990e6fce770241d347550499bafda1 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 18 Oct 2021 15:48:08 +0000 Subject: [PATCH] feat: Introduce Native Image testing build script changes (#1240) Adds additional switch case to build.sh to accommodate native image testing. Source-Link: https://github.com/googleapis/synthtool/commit/d45942be8066ad57bd0509f4a16e1fac78ecc50f Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:d4b2141d65566523dfd523f63c6e6899ab1281463bce182a9f600e74b0511875 --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/build.sh | 5 +++++ .kokoro/presubmit/graalvm-native.cfg | 33 ++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .kokoro/presubmit/graalvm-native.cfg diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 5ff6c87c..dc53bbb5 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.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 diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 8e9fb01e..a16a3329 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -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. diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg new file mode 100644 index 00000000..4c7225ec --- /dev/null +++ b/.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" +}