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



49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/fastlane/plugin/apadmi_grout/utils/common_options.rb', line 49

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



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/fastlane/plugin/apadmi_grout/utils/common_options.rb', line 27

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

.confluence_optionsObject



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

def self.confluence_options
  [
    FastlaneCore::ConfigItem.new(key: :confluence_base_url,
                                 description: "Confluence base url",
                                 env_name: "CONFLUENCE_BASE_URL",
                                 type: String,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :confluence_client_id,
                                 description: "Confluence client id for authentication",
                                 env_name: "CONFLUENCE_CLIENT_ID",
                                 type: String,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :confluence_client_secret,
                                 description: "Confluence client secret for authentication",
                                 env_name: "CONFLUENCE_CLIENT_SECRET",
                                 type: String,
                                 optional: true)
  ]
end

.jira_optionsObject



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/fastlane/plugin/apadmi_grout/utils/common_options.rb', line 62

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