Class: Fastlane::Actions::RollbarReportDeployAction

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

Class Method Summary collapse

Class Method Details

.authorsObject



25
26
27
# File 'lib/fastlane/plugin/rollbar/actions/rollbar_report_deploy_action.rb', line 25

def self.authors
  ['Evgrafov Denis']
end

.available_optionsObject



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/fastlane/plugin/rollbar/actions/rollbar_report_deploy_action.rb', line 37

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :api_key, description: 'Rollbar API key', optional: false, type: String),
    FastlaneCore::ConfigItem.new(key: :environment, description: 'Environment', optional: false, type: String),
    FastlaneCore::ConfigItem.new(key: :revision, description: 'Git SHA of revision being deployed', optional: false, type: String),
    FastlaneCore::ConfigItem.new(key: :rollbar_username, description: 'Rollbar username of person who deployed', optional: true, type: String),
    FastlaneCore::ConfigItem.new(key: :local_username, description: 'Local username of person who deployed. Displayed in web app if no rollbar_username was specified', optional: true, type: String),
    FastlaneCore::ConfigItem.new(key: :comment, description: 'Additional text to include with the deploy', optional: true, type: String),
    FastlaneCore::ConfigItem.new(key: :status, description: 'Status of the deployment - started, succeeded (default), failed, or timed_out', optional: true, type: String)
  ]
end

.descriptionObject



21
22
23
# File 'lib/fastlane/plugin/rollbar/actions/rollbar_report_deploy_action.rb', line 21

def self.description
  'Helps to report deploy to Rollbar'
end

.detailsObject



33
34
35
# File 'lib/fastlane/plugin/rollbar/actions/rollbar_report_deploy_action.rb', line 33

def self.details
  'Helps to report deploy to Rollbar'
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


49
50
51
52
53
54
55
# File 'lib/fastlane/plugin/rollbar/actions/rollbar_report_deploy_action.rb', line 49

def self.is_supported?(platform)
  # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
  # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
  #
  %i[ios android].include?(platform)
  true
end

.return_valueObject



29
30
31
# File 'lib/fastlane/plugin/rollbar/actions/rollbar_report_deploy_action.rb', line 29

def self.return_value
  # If your method provides a return value, you can describe here what it does
end

.run(params) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/fastlane/plugin/rollbar/actions/rollbar_report_deploy_action.rb', line 9

def self.run(params)
  Helper::RollbarHelper.report_deploy(
    params[:api_key],
    params[:environment],
    params[:revision],
    params[:local_username],
    params[:rollbar_username],
    params[:comment],
    params[:status]
  )
end