Skip to content

Commit

Permalink
try obtaining workspace info from google project resource labels
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkinsc committed Oct 20, 2023
1 parent 6a68cd8 commit 2489cb9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pipes/WDL/tasks/tasks_terra.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,15 @@ task get_gcloud_env_info {

gcloud auth print-access-token

gcloud config list --format='text(core.project)'
GOOGLE_PROJECT_ID="$(gcloud config list --format='value(core.project)')"

#get project namespace:
WORKSPACE_NAMESPACE="$(gcloud projects describe $GOOGLE_PROJECT_ID --format='value(labels.workspacenamespace)')"
WORKSPACE_NAME="$(gcloud projects describe $GOOGLE_PROJECT_ID --format='value(labels.workspacename)')"

echo "GOOGLE_PROJECT_ID: ${GOOGLE_PROJECT_ID}"
echo "WORKSPACE_NAMESPACE: ${WORKSPACE_NAMESPACE}"
echo "WORKSPACE_NAME: ${WORKSPACE_NAME}"

touch additional_command_stdout.log

Expand Down

0 comments on commit 2489cb9

Please sign in to comment.