Skip to content

Commit

Permalink
fixes var name
Browse files Browse the repository at this point in the history
  • Loading branch information
luispresuelVenafi committed Jun 3, 2024
1 parent a6c362e commit 4141800
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@ def build_provision_cmd(platform, cloudkeystore_type, keystore_provider_names, f
end

Kernel.puts("Checking output:\n"+@previous_command_output)
keystore_id = ""
cloud_id = ""
case @cloudkeystore_type
when $keystore_type_aws
when $keystore_type_azure
when $keystore_type_gcp
keystore_id = "gcpId"
cloud_id = "gcpId"
else
fail(ArgumentError.new("Unexpected : #{@cloudkeystore_type}"))
end
if json
json_string = extract_json_from_output(@previous_command_output)
JSON.parse(json_string)
@keystore_id = unescape_text(normalize_json(json_string, "#{keystore_id}")).tr('"', '')
@cloud_id = unescape_text(normalize_json(json_string, "#{cloud_id}")).tr('"', '')
else
m = @previous_command_output.match /#{keystore_id} (.+)$/
@keystore_id = m[1]
@cloud_id = m[1]
end
end

Expand All @@ -90,6 +90,6 @@ def build_provision_cmd(platform, cloudkeystore_type, keystore_provider_names, f

def cleanup_google
client = create_certificate_manager_client
certificate_name = "projects/#{ENV['GCP_PROJECT']}/locations/#{ENV['GCP_REGION']}/certificates/#{@keystore_id}"
certificate_name = "projects/#{ENV['GCP_PROJECT']}/locations/#{ENV['GCP_REGION']}/certificates/#{@cloud_id}"
delete_certificate(client, certificate_name)
end

0 comments on commit 4141800

Please sign in to comment.