From 1d37fa3c2b61b616a975c2c4dfa55ea56d56055a Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Tue, 7 Nov 2023 14:35:29 +0000 Subject: [PATCH] build: add native image kokoro cfgs (#1896) --- .kokoro/build.sh | 10 ++++++++ .kokoro/presubmit/graalvm-native-a.cfg | 33 ++++++++++++++++++++++++++ .kokoro/presubmit/graalvm-native-b.cfg | 33 ++++++++++++++++++++++++++ owlbot.py | 1 + 4 files changed, 77 insertions(+) create mode 100644 .kokoro/presubmit/graalvm-native-a.cfg create mode 100644 .kokoro/presubmit/graalvm-native-b.cfg diff --git a/.kokoro/build.sh b/.kokoro/build.sh index f9cf38f48..a1462f60d 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -79,6 +79,16 @@ graalvm17) mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test RETURN_CODE=$? ;; +graalvmA) + # Run Unit and Integration Tests with Native Image + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test + RETURN_CODE=$? + ;; +graalvmB) + # Run Unit and Integration Tests with Native Image + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative 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/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg new file mode 100644 index 000000000..f8c3c4488 --- /dev/null +++ b/.kokoro/presubmit/graalvm-native-a.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:22.3.3" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvmA" +} + +# 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 diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg new file mode 100644 index 000000000..9ae343c8b --- /dev/null +++ b/.kokoro/presubmit/graalvm-native-b.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:22.3.3" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvmB" +} + +# 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 diff --git a/owlbot.py b/owlbot.py index 8a64e3837..6f2484f03 100644 --- a/owlbot.py +++ b/owlbot.py @@ -28,5 +28,6 @@ "checkstyle.xml", "license-checks.xml", ".github/workflows/samples.yaml", + ".kokoro/build.sh" ] )