class Fastlane::Actions::QueueAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/queue/actions/queue_action.rb, line 34
def self.authors
  ["Josh Holtz"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/queue/actions/queue_action.rb, line 46
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :run,
                         description: "Run that stuff",
                            optional: true,
                                type: String),
    FastlaneCore::ConfigItem.new(key: :platform,
                         description: "Run that stuff",
                            optional: true,
                                type: String),
    FastlaneCore::ConfigItem.new(key: :lane,
                         description: "Run that stuff",
                            optional: true,
                                type: String),
    FastlaneCore::ConfigItem.new(key: :lane_parameters,
                         description: "Run that stuff",
                            optional: true,
                                type: Hash)
  ]
end
description() click to toggle source
# File lib/fastlane/plugin/queue/actions/queue_action.rb, line 30
def self.description
  "Adds fastlane jobs to a queue"
end
details() click to toggle source
# File lib/fastlane/plugin/queue/actions/queue_action.rb, line 42
def self.details
  "Adds fastlane jobs to a Resque queue"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/queue/actions/queue_action.rb, line 67
def self.is_supported?(platform)
  true
end
return_value() click to toggle source
# File lib/fastlane/plugin/queue/actions/queue_action.rb, line 38
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/queue/actions/queue_action.rb, line 6
def self.run(params)
  # Should be value like "<platform> <lane> <parameters...>"
  # Ex: "ios build environment:production"
  # Usage: fastlane run queue run:"ios build environment:production"
  run = params[:run]

  # These values come in from running the queue action in a Fastfile
  platform = params[:platform]
  lane = params[:lane]
  lane_parameters = params[:lane_parameters]

  if lane_parameters
    lane_parameters['queue'] = nil
    lane_parameters[:queue] = nil
  end

  Resque.enqueue(Job, {
    'run' => run,
    'platform' => platform,
    'lane' => lane,
    'lane_parameters' => lane_parameters
    })
end