@@ -19,13 +19,23 @@ if [ -z "${PREVIEW_ENV_DEV_SA_KEY_PATH:-}" ]; then
1919fi
2020
2121if [ -f " /usr/local/gitpod/config/initial-spec.json" ]; then
22+ # gcloud iam workload-identity-pools create-cred-config \
23+ # projects/184212049955/locations/global/workloadIdentityPools/app-gitpod/providers/app-gitpod-provider \
24+ # --service-account=preview-environmnet-dev@gitpod-dev-preview.iam.gserviceaccount.com \
25+ # --service-account-token-lifetime-seconds=1h \
26+ # --output-file="${PREVIEW_ENV_DEV_SA_KEY_PATH}" \
27+ # --executable-command='gitpod-new idp token --audience="//iam.googleapis.com/projects/184212049955/locations/global/workloadIdentityPools/app-gitpod/providers/app-gitpod-provider" --gcloud' \
28+ # --executable-timeout-millis=5000
29+
2230 gcloud iam workload-identity-pools create-cred-config \
23- projects/184212049955/locations/global/workloadIdentityPools/gitpod-next /providers/gitpod-next -provider \
31+ projects/184212049955/locations/global/workloadIdentityPools/app-gitpod /providers/app-gitpod -provider \
2432 --service-account=preview-environmnet-dev@gitpod-dev-preview.iam.gserviceaccount.com \
25- --service-account-token-lifetime-seconds=1h \
26- --output-file=" ${PREVIEW_ENV_DEV_SA_KEY_PATH} " \
27- --executable-command=' node /workspace/gitpod/dev/next-oidc/oidc.js' \
28- --executable-timeout-millis=5000
33+ --subject-token-type=" urn:ietf:params:oauth:token-type:jwt" \
34+ --credential-source-type=" json" \
35+ --executable-command=' gitpod-new idp token --audience="//iam.googleapis.com/projects/184212049955/locations/global/workloadIdentityPools/app-gitpod/providers/app-gitpod-provider" --gcloud' \
36+ --executable-timeout-millis=5000 \
37+ --executable-output-file=" /tmp/gcloud-oidc.json" \
38+ --output-file=" ${PREVIEW_ENV_DEV_SA_KEY_PATH} "
2939elif [[ -n " ${PREVIEW_ENV_DEV_CRED:- } " ]]; then
3040 echo " ${PREVIEW_ENV_DEV_CRED} " > " ${PREVIEW_ENV_DEV_SA_KEY_PATH} "
3141fi
0 commit comments