Skip to content

Commit

Permalink
fix cleanup to delete versioned GCP buckets
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Jones committed Aug 5, 2019
1 parent 378c87a commit be46f58
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ci/tasks/ruby-lib/gcp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def new_orphan(bucket_name)
def cleanup(orphan)
bucket = orphan.bucket
if bucket.contents.empty?
bucket.delete_empty
bucket.delete
else
found_components = 0
found_components += delete_components('compute instances', "labels.deployment:bosh AND labels.control-tower-project:#{orphan.project}", 'name')
Expand Down Expand Up @@ -127,8 +127,4 @@ def key_files?
def delete
`gsutil rm -r gs://#{name}`
end

def delete_empty
`gsutil rb gs://#{name}`
end
end

0 comments on commit be46f58

Please sign in to comment.