Skip to content

Commit

Permalink
correct auth in split intervals (#7790)
Browse files Browse the repository at this point in the history
* correct auth in split intervals

* I dont like it, but at least we know it works
  • Loading branch information
RoriCremer authored Apr 19, 2022
1 parent 1387d47 commit 3c500f7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions scripts/variantstore/wdl/GvsUtils.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,6 @@ task SplitIntervals {
set -e
export GATK_LOCAL_JAR=~{default="/root/gatk.jar" gatk_override}

if [ ~{has_service_account_file} = 'true' ]; then
gsutil cp ~{service_account_json_path} local.service_account.json
export GOOGLE_APPLICATION_CREDENTIALS=local.service_account.json
gcloud auth activate-service-account --key-file=local.service_account.json
fi

mkdir interval-files
gatk --java-options "-Xmx~{java_memory}g" ~{gatkTool} \
--dont-mix-contigs \
Expand All @@ -121,6 +115,11 @@ task SplitIntervals {
# Drop trailing slash if one exists
OUTPUT_GCS_DIR=$(echo ~{output_gcs_dir} | sed 's/\/$//')

if [ ~{has_service_account_file} = 'true' ]; then
gsutil cp ~{service_account_json_path} local.service_account.json
gcloud auth activate-service-account --key-file=local.service_account.json
fi

if [ -n "$OUTPUT_GCS_DIR" ]; then
gsutil -m cp *.interval_list $OUTPUT_GCS_DIR/
fi
Expand Down

0 comments on commit 3c500f7

Please sign in to comment.