@@ -28,18 +28,18 @@ mkdir -p ${SECRET_LOCATION}
2828for key in $( echo ${SECRET_MANAGER_KEYS} | sed " s/,/ /g" )
2929do
3030 msg " Retrieving secret ${key} "
31- gcloud secrets versions access latest \
32- --project cloud-devrel-kokoro-resources \
33- --secret ${key} > " ${SECRET_LOCATION} / ${key} "
34- # docker run --entrypoint=gcloud \
35- # --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \
36- # gcr.io/google.com/cloudsdktool/cloud-sdk \
37- # secrets versions access latest \
38- # --project cloud-devrel-kokoro-resources \
39- # --secret ${key} > \
40- # "${SECRET_LOCATION}/${key}"
41- if [[ -f " ${SECRET_LOCATION} / ${ key}" ]] ; then
42- msg " Secret file exists: ${SECRET_LOCATION} /${key} "
31+ if [[ " ${JOB_TYPE} " == * " graalvm " * ]] ; then
32+ gcloud secrets versions access latest \
33+ --project cloud-devrel-kokoro-resources \
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} "
4343 fi
4444 if [[ $? == 0 ]]; then
4545 msg " Secret written to ${SECRET_LOCATION} /${key} "
0 commit comments