Class: Apadmi::Grout::CommonOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/apadmi_grout/utils/common_options.rb

Overview

Common options used to setup ADO and JIRA integration

Class Method Summary collapse

Class Method Details

.ado_optionsObject



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/fastlane/plugin/apadmi_grout/utils/common_options.rb', line 29

def self.ado_options
  [
    FastlaneCore::ConfigItem.new(key: :ado_pat,
                                 description: "ADO personal access token for authentication",
                                 env_name: "ADO_PAT",
                                 type: String,
                                 verify_block: proc do |value|
                                   UI.user_error!("Didn't pass a valid personal access token") unless value
                                 end,
                                 optional: true)
  ]
end

.board_optionsObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/fastlane/plugin/apadmi_grout/utils/common_options.rb', line 7

def self.board_options
  [
    FastlaneCore::ConfigItem.new(key: :board_base_url,
                                 description: "Base url for the organisation",
                                 env_name: "BOARD_BASE_URL",
                                 type: String,
                                 verify_block: proc do |value|
                                   UI.user_error!("Didn't pass a valid base url") unless value
                                 end,
                                 optional: false),
    FastlaneCore::ConfigItem.new(key: :board_provider,
                                 description: "The board provider, valid values: ADO|JIRA",
                                 env_name: "BOARD_PROVIDER",
                                 type: String,
                                 default_value: "JIRA",
                                 verify_block: proc do |value|
                                   UI.user_error!("Didn't pass a valid board provider") unless value
                                 end,
                                 optional: false)
  ] + ado_options + jira_options
end

.jira_optionsObject



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/fastlane/plugin/apadmi_grout/utils/common_options.rb', line 42

def self.jira_options
  [
    FastlaneCore::ConfigItem.new(key: :jira_username,
                                 description: "JIRA username for authentication with JIRA",
                                 env_name: "JIRA_USERNAME",
                                 type: String,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :jira_api_token,
                                 description: "JIRA api token for authentication with JIRA",
                                 env_name: "JIRA_API_TOKEN",
                                 type: String,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :jira_project_key,
                                 description: "JIRA project key",
                                 env_name: "JIRA_PROJECT_KEY",
                                 type: String,
                                 optional: true),

    FastlaneCore::ConfigItem.new(key: :jira_context_path,
                                 description: "JIRA context path whatever that is ¯\\_(ツ)_/¯",
                                 env_name: "JIRA_CONTEXT_PATH",
                                 default_value: "",
                                 type: String,
                                 optional: true)
  ]
end