Skip to content

Commit f3ba6db

Browse files
authored
chore: migrate graalvm jobs to kokoro instance pool (#1580)
* chore: migrate graalvm jobs to kokoro instance pools.
1 parent 08a5436 commit f3ba6db

File tree

6 files changed

+27
-26
lines changed

6 files changed

+27
-26
lines changed

.kokoro/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,15 @@ integration)
7272
;;
7373
graalvmA)
7474
# Run Unit and Integration Tests with Native Image
75+
bash .kokoro/populate-secrets.sh
76+
export GOOGLE_APPLICATION_CREDENTIALS="${KOKORO_GFILE_DIR}/secret_manager/java-it-service-account"
7577
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Pnative-test test -pl 'oauth2_http'
7678
RETURN_CODE=$?
7779
;;
7880
graalvmB)
7981
# Run Unit and Integration Tests with Native Image
82+
bash .kokoro/populate-secrets.sh
83+
export GOOGLE_APPLICATION_CREDENTIALS="${KOKORO_GFILE_DIR}/secret_manager/java-it-service-account"
8084
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Pnative-test test -pl 'oauth2_http'
8185
RETURN_CODE=$?
8286
;;

.kokoro/populate-secrets.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,19 @@ mkdir -p ${SECRET_LOCATION}
2828
for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g")
2929
do
3030
msg "Retrieving secret ${key}"
31-
docker run --entrypoint=gcloud \
32-
--volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \
33-
gcr.io/google.com/cloudsdktool/cloud-sdk \
34-
secrets versions access latest \
31+
if [[ "${JOB_TYPE}" == *"graalvm"* ]]; then
32+
gcloud secrets versions access latest \
3533
--project cloud-devrel-kokoro-resources \
36-
--secret ${key} > \
37-
"${SECRET_LOCATION}/${key}"
34+
--secret ${key} > "${SECRET_LOCATION}/${key}"
35+
else
36+
docker run --entrypoint=gcloud \
37+
--volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \
38+
gcr.io/google.com/cloudsdktool/cloud-sdk \
39+
secrets versions access latest \
40+
--project cloud-devrel-kokoro-resources \
41+
--secret ${key} > \
42+
"${SECRET_LOCATION}/${key}"
43+
fi
3844
if [[ $? == 0 ]]; then
3945
msg "Secret written to ${SECRET_LOCATION}/${key}"
4046
else

.kokoro/presubmit/common.cfg

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,3 @@ env_vars: {
2323
key: "JOB_TYPE"
2424
value: "test"
2525
}
26-
27-
before_action {
28-
fetch_keystore {
29-
keystore_resource {
30-
keystore_config_id: 73713
31-
keyname: "dpebot_codecov_token"
32-
}
33-
}
34-
}

.kokoro/presubmit/graalvm-native-a.cfg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Format: //devtools/kokoro/config/proto/build.proto
22

3-
# Configure the docker image for kokoro-trampoline.
4-
env_vars: {
5-
key: "TRAMPOLINE_IMAGE"
6-
value: "gcr.io/cloud-devrel-public-resources/graalvm_a:1.11.3"
7-
}
3+
build_file: "google-auth-library-java/.kokoro/build.sh"
84

95
env_vars: {
106
key: "JOB_TYPE"
@@ -47,3 +43,7 @@ env_vars: {
4743
value: "gcloud-devel"
4844
}
4945

46+
container_properties {
47+
docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:1.12.0"
48+
}
49+

.kokoro/presubmit/graalvm-native-b.cfg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Format: //devtools/kokoro/config/proto/build.proto
22

3-
# Configure the docker image for kokoro-trampoline.
4-
env_vars: {
5-
key: "TRAMPOLINE_IMAGE"
6-
value: "gcr.io/cloud-devrel-public-resources/graalvm_b:1.11.3"
7-
}
3+
build_file: "google-auth-library-java/.kokoro/build.sh"
84

95
env_vars: {
106
key: "JOB_TYPE"
@@ -46,3 +42,7 @@ env_vars: {
4642
key: "GOOGLE_CLOUD_QUOTA_PROJECT"
4743
value: "gcloud-devel"
4844
}
45+
46+
container_properties {
47+
docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:1.12.0"
48+
}

renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"fileMatch": [
1919
"^.kokoro/presubmit/graalvm-native.*.cfg$"
2020
],
21-
"matchStrings": ["value: \"gcr.io/cloud-devrel-public-resources/graalvm.*:(?<currentValue>.*?)\""],
21+
"matchStrings": ["docker_image: \"us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm.*:(?<currentValue>.*?)\""],
2222
"depNameTemplate": "com.google.cloud:google-cloud-shared-config",
2323
"datasourceTemplate": "maven"
2424
}

0 commit comments

Comments
 (0)