File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -341,5 +341,5 @@ ENV PRE_COMMIT_HOME=/workspace/.pre-commit
341
341
342
342
# Setting the environment variable here so that it will be accessible to all tasks and
343
343
# terminal sessions in Gitpod workspaces.
344
- ENV PREVIEW_ENV_DEV_SA_KEY_PATH=
344
+ ENV PREVIEW_ENV_DEV_SA_KEY_PATH=/root/.config/gcloud/sa.json
345
345
ENV GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES=1
Original file line number Diff line number Diff line change @@ -8,15 +8,15 @@ const getIDToken = async () => {
8
8
const config = JSON . parse ( fs . readFileSync ( configPath , "utf8" ) ) ;
9
9
10
10
const controlPlaneApiEndpoint = config . controlPlaneApiEndpoint ;
11
- const workspaceToken = config . workspaceToken ;
11
+ const environmentToken = config . environmentToken ;
12
12
13
13
const url = new URL ( controlPlaneApiEndpoint ) ;
14
14
const client = http2 . connect ( url . origin ) ;
15
15
16
16
const req = client . request ( {
17
17
":method" : "POST" ,
18
18
"content-type" : "application/json" ,
19
- authorization : `Bearer ${ workspaceToken } ` ,
19
+ authorization : `Bearer ${ environmentToken } ` ,
20
20
":path" : `${ url . pathname } /gitpod.v1.IdentityService/GetIDToken` ,
21
21
} ) ;
22
22
Original file line number Diff line number Diff line change 20
20
21
21
if [ -f " /usr/local/gitpod/config/initial-spec.json" ]; then
22
22
gcloud iam workload-identity-pools create-cred-config \
23
- projects/184212049955/locations/global/workloadIdentityPools/gitpod-next /providers/gitpod-next -provider \
23
+ projects/184212049955/locations/global/workloadIdentityPools/gitpod-flex /providers/gitpod-flex -provider \
24
24
--service-account=preview-environmnet-dev@gitpod-dev-preview.iam.gserviceaccount.com \
25
25
--service-account-token-lifetime-seconds=1h \
26
26
--output-file=" ${PREVIEW_ENV_DEV_SA_KEY_PATH} " \
27
- --executable-command=' node /workspace/gitpod/dev/next -oidc/oidc.js' \
27
+ --executable-command=' node /workspace/gitpod/dev/flex -oidc/oidc.js' \
28
28
--executable-timeout-millis=5000
29
29
elif [[ -n " ${PREVIEW_ENV_DEV_CRED:- } " ]]; then
30
30
echo " ${PREVIEW_ENV_DEV_CRED} " > " ${PREVIEW_ENV_DEV_SA_KEY_PATH} "
You can’t perform that action at this time.
0 commit comments