Class: Fastlane::Actions::OvoAzureBlobExistsAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/ovo_azure/actions/ovo_azure_blob_exists_action.rb

Class Method Summary collapse

Class Method Details

.authorsObject



19
20
21
# File 'lib/fastlane/plugin/ovo_azure/actions/ovo_azure_blob_exists_action.rb', line 19

def self.authors
  ["Christian Borsato"]
end

.available_optionsObject



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/fastlane/plugin/ovo_azure/actions/ovo_azure_blob_exists_action.rb', line 31

def self.available_options
  [
    FastlaneCore::ConfigItem.new(
      key: :account,
      env_name: "AZURE_ACCOUNT_NAME",
      description: "The name of the Azure account where the container is hosted",
      optional: false,
      is_string: true
    ),
    FastlaneCore::ConfigItem.new(
      key: :container,
      env_name: "AZURE_CONTAINER_NAME",
      description: "The name of the Azure container where the file will be stored",
      optional: false,
      is_string: true
    ),
    FastlaneCore::ConfigItem.new(
      key: :sas_token,
      env_name: "AZURE_SAS_TOKEN",
      description: "The Shared Access Signature (SAS) token that grants secure access to the Azure container",
      optional: false,
      is_string: true
    ),
    FastlaneCore::ConfigItem.new(
      key: :blob_path,
      description: "The relative path where the blob file is located, including the file name. For example, '/test/ios/test.json'",
      optional: false,
      is_string: true
    )
  ]
end

.categoryObject



67
68
69
# File 'lib/fastlane/plugin/ovo_azure/actions/ovo_azure_blob_exists_action.rb', line 67

def self.category
  :misc
end

.descriptionObject



15
16
17
# File 'lib/fastlane/plugin/ovo_azure/actions/ovo_azure_blob_exists_action.rb', line 15

def self.description
  "An action to check the existence of a blob in an Azure container."
end

.detailsObject



27
28
29
# File 'lib/fastlane/plugin/ovo_azure/actions/ovo_azure_blob_exists_action.rb', line 27

def self.details
  "This action allows you to check whether a specific blob exists within a specified Azure container. It is useful for ensuring that a blob is present before performing further actions, such as uploading or processing files, without needing to manually verify its existence."
end

.is_supported?(platform) ⇒ Boolean



63
64
65
# File 'lib/fastlane/plugin/ovo_azure/actions/ovo_azure_blob_exists_action.rb', line 63

def self.is_supported?(platform)
  true
end

.return_valueObject



23
24
25
# File 'lib/fastlane/plugin/ovo_azure/actions/ovo_azure_blob_exists_action.rb', line 23

def self.return_value
  "This action returns a boolean value: true if the blob was successfully created or overwritten, and false if the upload was skipped because the blob already exists and overwriting is disabled. If an error occurs during the upload process (e.g., due to authentication issues, network errors, or invalid parameters), the action returns nil."
end

.run(params) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fastlane/plugin/ovo_azure/actions/ovo_azure_blob_exists_action.rb', line 6

def self.run(params)
  Helper::OvoAzureHelper.is_blob_exists(
    account: params[:account],
    container: params[:container],
    sas_token: params[:sas_token],
    blob_path: params[:blob_path]
  )
end