class Fastlane::Actions::GsErrorAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/gs_project_flow_ios/actions/gs_error_action.rb, line 22
def self.authors
  ["Сергей Веселовский"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/gs_project_flow_ios/actions/gs_error_action.rb, line 35
def self.available_options
  [
      FastlaneCore::ConfigItem.new(key: :lane,
                           description: "A description of your option",
                              optional: false,
                                  type: Symbol),
      FastlaneCore::ConfigItem.new(key: :exception,
                                   description: "A description of your option",
                                   optional: false,
                                   is_string: false),
      FastlaneCore::ConfigItem.new(key: :options,
                                   description: "Additional options",
                                   optional: true,
                                   type: Object)
  ]
end
description() click to toggle source
# File lib/fastlane/plugin/gs_project_flow_ios/actions/gs_error_action.rb, line 18
def self.description
  "Plugin contains project flow code for code sharing between projects"
end
details() click to toggle source
# File lib/fastlane/plugin/gs_project_flow_ios/actions/gs_error_action.rb, line 30
def self.details
  # Optional:
  "Plugin contains project flow code for code sharing between GradoService projects"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/gs_project_flow_ios/actions/gs_error_action.rb, line 52
def self.is_supported?(platform)
  # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
  # See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
  #
  # [:ios, :mac, :android].include?(platform)
  true
end
return_value() click to toggle source
# File lib/fastlane/plugin/gs_project_flow_ios/actions/gs_error_action.rb, line 26
def self.return_value
  # If your method provides a return value, you can describe here what it does
end
run(params) click to toggle source
# File lib/fastlane/plugin/gs_project_flow_ios/actions/gs_error_action.rb, line 4
def self.run(params)
  begin
    version_name, v = Helper::GsProjectFlowIosHelper.version_for_lane(params[:lane], Helper::GsProjectFlowIosHelper::BuildState::FAILURE)
    # ENV["PROJECT_NAME"] - переменка окружения, используемая в iOS, как читаемое название проекта + ключ в json файлике версий
    message = ENV["PROJECT_NAME"] + " " + version_name + " build has failed. Reason:\n " + params[:exception].message

    UI.important(message)
    Helper::GsProjectFlowIosHelper.send_report(message,Helper::GsProjectFlowIosHelper::BuildState::FAILURE, params[:lane], params[:options][:restart_build_url])
  rescue => ex
    message = "Build has failed on error lane. Reason main lane failed:\n " + params[:exception].message + " \n Reason error lane failed:\n" + ex.message
    Helper::GsProjectFlowIosHelper.send_report(message,Helper::GsProjectFlowIosHelper::BuildState::FAILURE, params[:lane], params[:options][:restart_build_url])
  end
end