File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,9 +68,8 @@ for output_file in "${OUTPUT_FILES[@]}"; do
6868 echo " ${output_file} .meta.tsv" >> output_files.txt
6969done
7070
71- gsutil \
72- -u " ${BILLING_PROJECT} " \
73- -m cp \
71+ gcloud storage cp \
72+ --billing-project=" ${BILLING_PROJECT} " \
7473 -I \
7574 " ${DESTINATION_PATH} " \
7675< output_files.txt
Original file line number Diff line number Diff line change @@ -43,16 +43,16 @@ gsync() {
4343 source_path=" ${1#/ } /"
4444 destination_path=" ${2#/ } /"
4545
46- gsutil -m rsync \
47- -d \
46+ gcloud storage rsync \
47+ --delete-unmatched-destination-objects \
4848 -r \
4949 ${DRY_RUN_ARG} \
5050 " ${source_path} " \
5151 " ${destination_path} "
5252}
5353
5454# Default to dry run if promotion is not selected
55- DRY_RUN_ARG=" -n "
55+ DRY_RUN_ARG=" --dry-run "
5656FOLDER_TYPE=" "
5757PREFIX=" "
5858DELETE=" "
@@ -146,7 +146,7 @@ for team in "${TEAMS[@]}"; do
146146 response=$( echo " $response " | tr ' [:upper:]' ' [:lower:]' )
147147 if [[ " $response " == " yes" ]]; then
148148 log " Starting deletion..."
149- gsutil -m rm -r " $raw_bucket "
149+ gcloud storage rm -r " $raw_bucket "
150150 elif [[ " $response " == " no" ]]; then
151151 log " Deletion canceled"
152152 else
Original file line number Diff line number Diff line change @@ -18,28 +18,27 @@ task upload_final_outputs {
1818
1919 echo -e "filename\tmd5_hash\ttimestamp\tworkflow\tworkflow_version\tworkflow_release" > MANIFEST.tsv
2020 mkdir metadata
21- gsutil -u ~{billing_project } -m cp -I ./metadata / \
21+ gcloud storage cp --billing-project = ~{billing_project } -I ./metadata / \
2222 < metadata_paths.txt
2323
2424 find metadata -type f -exec cat {} \; \
2525 >> MANIFEST.tsv
2626
2727 while read -r staging_data_bucket || [[ -n "${staging_data_bucket} " ]]; do
2828 # Remove files currently existing at the target path, if they exist
29- if gsutil -u ~{billing_project } ls "${staging_data_bucket} /~{staging_data_path}/**" ; then
30- gsutil -u ~{billing_project } \
31- -m rm \
29+ if gcloud storage ls --billing-project =~{billing_project } "${staging_data_bucket} /~{staging_data_path}/**" ; then
30+ gcloud storage rm --billing-project =~{billing_project } \
3231 "${staging_data_bucket} /~{staging_data_path}/**"
3332 fi
3433
3534 # Copy files to the staging data path
36- gsutil -u ~{billing_project } -m cp \
35+ gcloud storage cp --billing-project = ~{billing_project } \
3736 -I \
3837 "${staging_data_bucket} /~{staging_data_path}/" \
3938 < ~{write_lines (output_file_paths )}
4039
4140 # Upload the manifest to the staging data path
42- gsutil -u ~{billing_project } -m cp \
41+ gcloud storage cp --billing-project = ~{billing_project } \
4342 MANIFEST.tsv \
4443 "${staging_data_bucket} /~{staging_data_path}/"
4544
You can’t perform that action at this time.
0 commit comments