fastlane-plugin-mobileiron 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/lib/fastlane/plugin/mobileiron.rb +16 -0
- data/lib/fastlane/plugin/mobileiron/actions/mobileiron_action.rb +248 -0
- data/lib/fastlane/plugin/mobileiron/client/mobileiron_api_client.rb +151 -0
- data/lib/fastlane/plugin/mobileiron/helper/appstore_apps_labels_response.rb +15 -0
- data/lib/fastlane/plugin/mobileiron/helper/appstore_apps_message_response.rb +19 -0
- data/lib/fastlane/plugin/mobileiron/helper/appstore_inhause_response.rb +56 -0
- data/lib/fastlane/plugin/mobileiron/helper/labels_summary_response.rb +78 -0
- data/lib/fastlane/plugin/mobileiron/helper/message_response.rb +22 -0
- data/lib/fastlane/plugin/mobileiron/helper/mobileiron_error_message.rb +21 -0
- data/lib/fastlane/plugin/mobileiron/helper/mobileiron_helper.rb +10 -0
- data/lib/fastlane/plugin/mobileiron/helper/ping_response.rb +28 -0
- data/lib/fastlane/plugin/mobileiron/version.rb +5 -0
- metadata +211 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 529b3bc8f6fa3dbc26cea862d2f79701979c91df3163078146cde00cac531035
|
4
|
+
data.tar.gz: 43949698d94b05259110413f688515126432abe4fad7782371442df8c1c87c40
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: eda1db0eeee6517f5bddec47d51ed3ebfe007d095376cbabb1bb7013260102c4c914818d1936e755b7846ba63e2b13bbafc91d255247103c0f53b5d6e481de7a
|
7
|
+
data.tar.gz: 423375b423ceec267c2585b0ef6db9c98cf7aed6c6fcae7e1fd9e39e1842c85d1b3724325683b393457197ad8be2249e05894e82e4def24fcd85fdb05959e066
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2021 Roman Ivannikov
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
#  Fastlane Mobileiron Plugin
|
4
|
+
|
5
|
+
Mobileiron makes distributing your apps to enterprise devices. By getting your apps onto users' devices quickly, you can get feedback early and often. To learn more about Mobileiron, go [here](https://www.mobileiron.com/en/products/uem).
|
6
|
+
|
7
|
+
|
8
|
+
## Supported Platform
|
9
|
+
- [iOS]
|
10
|
+
- [Android]
|
11
|
+
|
12
|
+
## Run tests for this plugin
|
13
|
+
|
14
|
+
To run both the tests, and code style validation, run
|
15
|
+
|
16
|
+
```
|
17
|
+
rake
|
18
|
+
```
|
19
|
+
|
20
|
+
To automatically fix many of the styling issues, use
|
21
|
+
```
|
22
|
+
rubocop -a
|
23
|
+
```
|
24
|
+
|
25
|
+
## Issues and Feedback
|
26
|
+
|
27
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
28
|
+
|
29
|
+
## Troubleshooting
|
30
|
+
|
31
|
+
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
32
|
+
|
33
|
+
## Using _fastlane_ Plugins
|
34
|
+
|
35
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
36
|
+
|
37
|
+
## About _fastlane_
|
38
|
+
|
39
|
+
_fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require "fastlane/plugin/mobileiron/version"
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module Mobileiron
|
5
|
+
# Return all .rb files inside the "actions" and "helper" directory
|
6
|
+
def self.all_classes
|
7
|
+
Dir[File.expand_path("**/{actions,helper}/*.rb", File.dirname(__FILE__))]
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# By default we want to import all available actions and helpers
|
13
|
+
# A plugin can contain any number of actions and plugins
|
14
|
+
Fastlane::Mobileiron.all_classes.each do |current|
|
15
|
+
require current
|
16
|
+
end
|
@@ -0,0 +1,248 @@
|
|
1
|
+
require "fastlane/action"
|
2
|
+
require_relative "../helper/appstore_apps_message_response"
|
3
|
+
require_relative "../helper/labels_summary_response"
|
4
|
+
require_relative "../helper/message_response"
|
5
|
+
require_relative "../helper/appstore_apps_labels_response"
|
6
|
+
require_relative "../helper/appstore_inhause_response"
|
7
|
+
require_relative "../helper/ping_response"
|
8
|
+
require_relative "../client/mobileiron_api_client"
|
9
|
+
require_relative "../helper/mobileiron_helper"
|
10
|
+
|
11
|
+
## TODO: should always use a file underneath? I think so.
|
12
|
+
## How should we document the usage of release notes?
|
13
|
+
module Fastlane
|
14
|
+
module Actions
|
15
|
+
class MobileironAction < Action
|
16
|
+
|
17
|
+
SPACE_ID = "1"
|
18
|
+
|
19
|
+
def self.run(params)
|
20
|
+
params.values # to validate all inputs before looking for the ipa/apk
|
21
|
+
|
22
|
+
base_url = base_url_from_params(params)
|
23
|
+
username = username_from_params(params)
|
24
|
+
password = password_from_params(params)
|
25
|
+
artifact_path = artifact_path_from_params(params)
|
26
|
+
|
27
|
+
# Check exist Artifact
|
28
|
+
unless File.exist?(artifact_path)
|
29
|
+
UI.user_error!(artifact_not_found(artifact_path))
|
30
|
+
end
|
31
|
+
|
32
|
+
# Check Artifact extname
|
33
|
+
unless is_valid_artifact_extname(artifact_path)
|
34
|
+
UI.user_error!(artifact_extname_not_valid(artifact_path))
|
35
|
+
end
|
36
|
+
|
37
|
+
mobileiron_client = Client::MobileironApiClient.new(base_url, username, password, params[:debug])
|
38
|
+
|
39
|
+
# Check available Mobileiron API
|
40
|
+
ping_result = mobileiron_client.ping
|
41
|
+
if ping_result.nil?
|
42
|
+
UI.user_error!(url_not_available(mobileiron_client.get_api_url))
|
43
|
+
end
|
44
|
+
UI.message("✅ Successfully connected to #{mobileiron_client.get_api_url}")
|
45
|
+
|
46
|
+
UI.message("Upload binary...")
|
47
|
+
upload_result = mobileiron_client.appstore_inhouse(artifact_path)
|
48
|
+
if upload_result.nil?
|
49
|
+
return
|
50
|
+
end
|
51
|
+
UI.success("✅ Successfully upload binary #{artifact_path} on Mobileiron.")
|
52
|
+
|
53
|
+
app_id = upload_result.results.id
|
54
|
+
UI.message("Id: #{app_id}")
|
55
|
+
UI.message("AppId: #{upload_result.results.app_id}")
|
56
|
+
UI.message("Name: #{upload_result.results.name}")
|
57
|
+
UI.message("DisplayVersion: #{upload_result.results.display_version}")
|
58
|
+
UI.message("Version: #{upload_result.results.version}")
|
59
|
+
|
60
|
+
# Apply label(s)
|
61
|
+
apply_labels = get_value_from_value_or_file(params[:labels], params[:labels_file])
|
62
|
+
apply_labels = string_to_array(apply_labels)
|
63
|
+
unless apply_labels.nil?
|
64
|
+
all_labels = mobileiron_client.get_labels_summary
|
65
|
+
|
66
|
+
unless all_labels.nil?
|
67
|
+
apply_labels.each do |apply_label|
|
68
|
+
UI.message("Apply label '#{apply_label.strip}' on Mobileiron...")
|
69
|
+
label_info = all_labels.results.find { |item| item.name.strip == apply_label.strip }
|
70
|
+
|
71
|
+
if !label_info.nil?
|
72
|
+
apply_label_response = mobileiron_client.appstore_apps_labels(app_id, label_info.id, SPACE_ID)
|
73
|
+
|
74
|
+
apply_label_response_message = apply_label_response.messages.first
|
75
|
+
success = apply_label_response_message.is_success
|
76
|
+
if success
|
77
|
+
UI.success("✅ Successfully Apply label '#{label_info.id}: #{label_info.name}' on Mobileiron.")
|
78
|
+
else
|
79
|
+
UI.message("#{apply_label_response_message.type}: #{apply_label_response_message.localized_message}")
|
80
|
+
end
|
81
|
+
else
|
82
|
+
UI.message("Apply label '#{apply_label}' not found.")
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
push_update_result = mobileiron_client.appstore_apps_message(app_id)
|
87
|
+
success = push_update_result.messages.first.is_success
|
88
|
+
|
89
|
+
if success
|
90
|
+
UI.success("✅ Successfully send message update app on Mobileiron.")
|
91
|
+
else
|
92
|
+
UI.message("#{push_update_result.type}: #{push_update_result.localized_message}")
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
UI.success("🎉 Mobileiron upload finished successfully.")
|
97
|
+
end
|
98
|
+
|
99
|
+
def self.description
|
100
|
+
"Release your app with Mobileiron"
|
101
|
+
end
|
102
|
+
|
103
|
+
def self.authors
|
104
|
+
["Roman Ivannikov: rivannikov"]
|
105
|
+
end
|
106
|
+
|
107
|
+
# supports markdown.
|
108
|
+
def self.details
|
109
|
+
"Release your app with Mobileiron"
|
110
|
+
end
|
111
|
+
|
112
|
+
def self.available_options
|
113
|
+
[
|
114
|
+
FastlaneCore::ConfigItem.new(key: :base_url,
|
115
|
+
env_name: "MOBILEIRON_BASE_URL",
|
116
|
+
description: "Mobileiron API base URL",
|
117
|
+
optional: false,
|
118
|
+
type: String),
|
119
|
+
|
120
|
+
FastlaneCore::ConfigItem.new(key: :username,
|
121
|
+
env_name: "MOBILEIRON_USERNAME",
|
122
|
+
description: "Mobileiron Username",
|
123
|
+
optional: false,
|
124
|
+
type: String),
|
125
|
+
|
126
|
+
FastlaneCore::ConfigItem.new(key: :password,
|
127
|
+
env_name: "MOBILEIRON_PASSWORD",
|
128
|
+
description: "Mobileiron Password",
|
129
|
+
optional: false,
|
130
|
+
type: String),
|
131
|
+
|
132
|
+
FastlaneCore::ConfigItem.new(key: :artifact_path,
|
133
|
+
env_name: "MOBILEIRON_ARTIFACT_PATH",
|
134
|
+
description: "Absolute path to your app's apk/ipa file",
|
135
|
+
optional: false,
|
136
|
+
verify_block: proc do |value|
|
137
|
+
UI.user_error!("mobileiron: Couldn't find file at path '#{value}'") unless File.exist?(value)
|
138
|
+
end,
|
139
|
+
type: String),
|
140
|
+
|
141
|
+
FastlaneCore::ConfigItem.new(key: :labels,
|
142
|
+
env_name: "MOBILEIRON_LABELS",
|
143
|
+
description: "Mobileiron Labels",
|
144
|
+
optional: true,
|
145
|
+
type: String),
|
146
|
+
|
147
|
+
FastlaneCore::ConfigItem.new(key: :labels_file,
|
148
|
+
env_name: "MOBILEIRON_LABELS_FILE",
|
149
|
+
description: "Mobileiron file with Labels",
|
150
|
+
optional: true,
|
151
|
+
verify_block: proc do |value|
|
152
|
+
UI.user_error!("mobileiron: Couldn't find file at path '#{value}'") unless File.exist?(value)
|
153
|
+
end,
|
154
|
+
type: String),
|
155
|
+
|
156
|
+
FastlaneCore::ConfigItem.new(key: :debug,
|
157
|
+
description: "Print verbose debug output",
|
158
|
+
optional: true,
|
159
|
+
default_value: false,
|
160
|
+
is_string: false)
|
161
|
+
]
|
162
|
+
end
|
163
|
+
|
164
|
+
def self.base_url_from_params(params)
|
165
|
+
base_url = params[:base_url]
|
166
|
+
|
167
|
+
if base_url.nil?
|
168
|
+
UI.crash!(ErrorMessage::MISSING_BASE_URL)
|
169
|
+
end
|
170
|
+
return base_url
|
171
|
+
end
|
172
|
+
|
173
|
+
def self.is_valid_artifact_extname(artifact_path)
|
174
|
+
return File.extname(artifact_path) == ".apk" || File.extname(artifact_path) == ".ipa"
|
175
|
+
end
|
176
|
+
|
177
|
+
def self.username_from_params(params)
|
178
|
+
username = params[:username]
|
179
|
+
|
180
|
+
if username.nil?
|
181
|
+
UI.crash!(ErrorMessage::MISSING_CREDENTIALS_USERNAME)
|
182
|
+
end
|
183
|
+
return username
|
184
|
+
end
|
185
|
+
|
186
|
+
def self.password_from_params(params)
|
187
|
+
password = params[:password]
|
188
|
+
|
189
|
+
if password.nil?
|
190
|
+
UI.crash!(ErrorMessage::MISSING_CREDENTIALS_PASSWORD)
|
191
|
+
end
|
192
|
+
return password
|
193
|
+
end
|
194
|
+
|
195
|
+
def self.artifact_path_from_params(params)
|
196
|
+
artifact_path = params[:artifact_path]
|
197
|
+
|
198
|
+
if artifact_path.nil?
|
199
|
+
UI.crash!(artifact_not_found(artifact_path))
|
200
|
+
end
|
201
|
+
return artifact_path
|
202
|
+
end
|
203
|
+
|
204
|
+
def self.get_value_from_value_or_file(value, path)
|
205
|
+
if (value.nil? || value.empty?) && !path.nil?
|
206
|
+
begin
|
207
|
+
return File.open(path).read
|
208
|
+
rescue Errno::ENOENT
|
209
|
+
UI.crash!("#{ErrorMessage::INVALID_PATH}: #{path}")
|
210
|
+
end
|
211
|
+
end
|
212
|
+
value
|
213
|
+
end
|
214
|
+
|
215
|
+
# Returns the array representation of a string with comma seperated values.
|
216
|
+
#
|
217
|
+
# Does not work with strings whose individual values have spaces. EX "Hello World" the space will be removed to "HelloWorld"
|
218
|
+
def self.string_to_array(string)
|
219
|
+
if string.nil? || string.empty?
|
220
|
+
return nil
|
221
|
+
end
|
222
|
+
string.split(";")
|
223
|
+
end
|
224
|
+
|
225
|
+
def self.is_supported?(platform)
|
226
|
+
# Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
|
227
|
+
# See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
|
228
|
+
#
|
229
|
+
[:ios, :android].include?(platform)
|
230
|
+
true
|
231
|
+
end
|
232
|
+
|
233
|
+
def self.example_code
|
234
|
+
[
|
235
|
+
<<-CODE
|
236
|
+
mobileiron(
|
237
|
+
base_url: "https://localhost",
|
238
|
+
username: "TestUser",
|
239
|
+
password: "password",
|
240
|
+
artifact_path: "/Users/test/TestApp-0.1.0.ipa",
|
241
|
+
labels: "Test label1; TestLabel2"
|
242
|
+
)
|
243
|
+
CODE
|
244
|
+
]
|
245
|
+
end
|
246
|
+
end
|
247
|
+
end
|
248
|
+
end
|
@@ -0,0 +1,151 @@
|
|
1
|
+
require "faraday"
|
2
|
+
require "faraday_middleware"
|
3
|
+
|
4
|
+
require "uri"
|
5
|
+
require "net/http"
|
6
|
+
|
7
|
+
module Fastlane
|
8
|
+
module Client
|
9
|
+
class MobileironApiClient
|
10
|
+
|
11
|
+
CONTENT_TYPE = "Content-Type"
|
12
|
+
APPLICATION_JSON = "application/json"
|
13
|
+
APPLICATION_OCTET_STREAM = "application/octet-stream"
|
14
|
+
|
15
|
+
def initialize(base_url, username, password, debug = true)
|
16
|
+
@base_url = base_url
|
17
|
+
@username = username
|
18
|
+
@password = password
|
19
|
+
@debug = debug
|
20
|
+
end
|
21
|
+
|
22
|
+
# Ping Mobileiron API
|
23
|
+
#
|
24
|
+
# Returns the Mobileiron API version, otherwise returns nil.
|
25
|
+
def ping
|
26
|
+
response = connection.get(get_ping_url)
|
27
|
+
if response.success?
|
28
|
+
PingResponse.new(response.body)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# Get App labels on Mobileiron
|
33
|
+
#
|
34
|
+
# Returns the available Mobileiron App label(s), otherwise returns nil.
|
35
|
+
def get_labels_summary
|
36
|
+
response = connection.get(get_labels_summary_url) do |request|
|
37
|
+
request.params[:adminDeviceSpaceId] = "1"
|
38
|
+
end
|
39
|
+
if response.success?
|
40
|
+
LabelsSummaryResponse.new(response.body)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# Get App label info on Mobileiron
|
45
|
+
#
|
46
|
+
# Returns the Mobileiron App label info, otherwise returns nil.
|
47
|
+
def get_label_summary(label)
|
48
|
+
labels = get_labels_summary
|
49
|
+
unless labels.nil?
|
50
|
+
labels.results.find { |item| item.name == label }
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# Upload artefact to Mobileiron
|
55
|
+
#
|
56
|
+
# args
|
57
|
+
# artifact - Absolute path to your app's apk/ipa file
|
58
|
+
#
|
59
|
+
# Throws a user_error if the binary file does not exist
|
60
|
+
# Returns status.
|
61
|
+
def appstore_inhouse(artifact)
|
62
|
+
payload = { :installer => Faraday::FilePart.new(artifact, APPLICATION_OCTET_STREAM) }
|
63
|
+
response = connection.post(get_appstore_inhouse_url) do |request|
|
64
|
+
request.params[:adminDeviceSpaceId] = "1"
|
65
|
+
request.body = payload
|
66
|
+
end
|
67
|
+
|
68
|
+
if response.success?
|
69
|
+
AppStoreInhouseResponse.new(response.body)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Apply app to app group label on Mobileiron
|
74
|
+
#
|
75
|
+
# args
|
76
|
+
# app_id - App Id from Mobileiron
|
77
|
+
# label_id - Label Id from Mobileiron
|
78
|
+
# space_id - Space Id from Mobileiron
|
79
|
+
#
|
80
|
+
# Returns status.
|
81
|
+
def appstore_apps_labels(app_id, label_id, space_id)
|
82
|
+
response = connection.put(get_appstore_apps_labels_url(app_id, label_id)) do |request|
|
83
|
+
request.params[:adminDeviceSpaceId] = space_id
|
84
|
+
end
|
85
|
+
|
86
|
+
if response.success?
|
87
|
+
AppStoreAppsLabelsResponse.new(response.body)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
# Send message to update App on Mobileiron
|
92
|
+
#
|
93
|
+
# args
|
94
|
+
# app_id - App Id from Mobileiron
|
95
|
+
#
|
96
|
+
# Throws a user_error if the binary file does not exist
|
97
|
+
def appstore_apps_message(app_id)
|
98
|
+
response = connection.post(get_appstore_apps_message_url(app_id)) do |request|
|
99
|
+
request.headers[CONTENT_TYPE] = APPLICATION_JSON
|
100
|
+
request.params[:adminDeviceSpaceId] = "1"
|
101
|
+
request.body = JSON.dump({ installIncluded: true, updateIncluded: true, pushApp: true })
|
102
|
+
end
|
103
|
+
|
104
|
+
if response.success?
|
105
|
+
AppStoreAppsMessageResponse.new(response.body)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
def get_api_url
|
110
|
+
@base_url + API_VERSION
|
111
|
+
end
|
112
|
+
|
113
|
+
private
|
114
|
+
|
115
|
+
API_VERSION = "/api/v2"
|
116
|
+
|
117
|
+
def get_ping_url
|
118
|
+
API_VERSION + "/ping"
|
119
|
+
end
|
120
|
+
|
121
|
+
def get_labels_summary_url
|
122
|
+
API_VERSION + "/labels/label_summary"
|
123
|
+
end
|
124
|
+
|
125
|
+
def get_appstore_inhouse_url
|
126
|
+
API_VERSION + "/appstore/inhouse"
|
127
|
+
end
|
128
|
+
|
129
|
+
def get_appstore_apps_labels_url(app_id, label_id)
|
130
|
+
API_VERSION + "/appstore/apps/#{app_id}/labels/#{label_id}"
|
131
|
+
end
|
132
|
+
|
133
|
+
def get_appstore_apps_message_url(app_id)
|
134
|
+
API_VERSION + "/appstore/apps/#{app_id}/message"
|
135
|
+
end
|
136
|
+
|
137
|
+
def connection
|
138
|
+
@connection ||= Faraday.new(url: @base_url) do |conn|
|
139
|
+
conn.basic_auth(@username, @password)
|
140
|
+
conn.request(:multipart)
|
141
|
+
conn.request :url_encoded
|
142
|
+
conn.response(:json, parser_options: { symbolize_names: true })
|
143
|
+
conn.response(:raise_error) # raise_error middleware will run before the json middleware
|
144
|
+
conn.response(:logger, nil, { headers: false, bodies: { request: false, response: true }, log_level: :debug }) if @debug
|
145
|
+
conn.adapter(Faraday.default_adapter)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class AppStoreAppsLabelsResponse
|
2
|
+
def initialize(response_json_hash)
|
3
|
+
@response_json_hash = response_json_hash
|
4
|
+
end
|
5
|
+
|
6
|
+
def messages
|
7
|
+
messages_hash = @response_json_hash[:messages]
|
8
|
+
array = []
|
9
|
+
messages_hash.each { |i|
|
10
|
+
array.push(MessageResponse.new(i))
|
11
|
+
}
|
12
|
+
return array
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class AppStoreAppsMessageResponse
|
2
|
+
def initialize(response_json_hash)
|
3
|
+
@response_json_hash = response_json_hash
|
4
|
+
end
|
5
|
+
|
6
|
+
def results
|
7
|
+
return @response_json_hash[:results]
|
8
|
+
end
|
9
|
+
|
10
|
+
def messages
|
11
|
+
messages_hash = @response_json_hash[:messages]
|
12
|
+
array = []
|
13
|
+
messages_hash.each { |i|
|
14
|
+
array.push(MessageResponse.new(i))
|
15
|
+
}
|
16
|
+
return array
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
class AppStoreInhouseResponse
|
2
|
+
def initialize(response_json_hash)
|
3
|
+
@response_json_hash = response_json_hash
|
4
|
+
end
|
5
|
+
|
6
|
+
def results
|
7
|
+
return AppStoreInhouseResults.new(@response_json_hash[:results])
|
8
|
+
end
|
9
|
+
|
10
|
+
def messages
|
11
|
+
return @response_json_hash[:messages]
|
12
|
+
end
|
13
|
+
|
14
|
+
class AppStoreInhouseResults
|
15
|
+
def initialize(json_hash)
|
16
|
+
@json_hash = json_hash
|
17
|
+
end
|
18
|
+
|
19
|
+
def id
|
20
|
+
return @json_hash[:id]
|
21
|
+
end
|
22
|
+
|
23
|
+
def name
|
24
|
+
return @json_hash[:name]
|
25
|
+
end
|
26
|
+
|
27
|
+
def platform_type
|
28
|
+
return @json_hash[:platformType]
|
29
|
+
end
|
30
|
+
|
31
|
+
def platform_code
|
32
|
+
return @json_hash[:platformCode]
|
33
|
+
end
|
34
|
+
|
35
|
+
def version
|
36
|
+
return @json_hash[:version]
|
37
|
+
end
|
38
|
+
|
39
|
+
def alt_version
|
40
|
+
return @json_hash[:altVersion]
|
41
|
+
end
|
42
|
+
|
43
|
+
def display_version
|
44
|
+
return @json_hash[:displayVersion]
|
45
|
+
end
|
46
|
+
|
47
|
+
def app_id
|
48
|
+
return @json_hash[:appId]
|
49
|
+
end
|
50
|
+
|
51
|
+
def provisioning_profile
|
52
|
+
return @json_hash[:provisioningProfile]
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
class LabelsSummaryResponse
|
2
|
+
def initialize(response_json_hash)
|
3
|
+
@response_json_hash = response_json_hash
|
4
|
+
end
|
5
|
+
|
6
|
+
def results
|
7
|
+
results_hash = @response_json_hash[:results]
|
8
|
+
array = []
|
9
|
+
results_hash.each { |i|
|
10
|
+
array.push(LabelsSummaryResultsItem.new(i))
|
11
|
+
}
|
12
|
+
return array
|
13
|
+
end
|
14
|
+
|
15
|
+
def messages
|
16
|
+
return @response_json_hash[:messages]
|
17
|
+
end
|
18
|
+
|
19
|
+
def total_count
|
20
|
+
return @response_json_hash[:totalCount]
|
21
|
+
end
|
22
|
+
|
23
|
+
def result_count
|
24
|
+
return @response_json_hash[:resultCount]
|
25
|
+
end
|
26
|
+
|
27
|
+
def has_more?
|
28
|
+
return @response_json_hash[:hasMore]
|
29
|
+
end
|
30
|
+
|
31
|
+
class LabelsSummaryResultsItem
|
32
|
+
def initialize(json_hash)
|
33
|
+
@json_hash = json_hash
|
34
|
+
end
|
35
|
+
|
36
|
+
def id
|
37
|
+
return @json_hash[:id]
|
38
|
+
end
|
39
|
+
|
40
|
+
def name
|
41
|
+
return @json_hash[:name]
|
42
|
+
end
|
43
|
+
|
44
|
+
def description
|
45
|
+
return @json_hash[:description]
|
46
|
+
end
|
47
|
+
|
48
|
+
def is_static
|
49
|
+
return @json_hash[:isStatic]
|
50
|
+
end
|
51
|
+
|
52
|
+
def criteria
|
53
|
+
return @json_hash[:criteria]
|
54
|
+
end
|
55
|
+
|
56
|
+
def device_count
|
57
|
+
return @json_hash[:deviceCount]
|
58
|
+
end
|
59
|
+
|
60
|
+
def device_space_id
|
61
|
+
return @json_hash[:deviceSpaceId]
|
62
|
+
end
|
63
|
+
|
64
|
+
def device_space_name
|
65
|
+
return @json_hash[:deviceSpaceName]
|
66
|
+
end
|
67
|
+
|
68
|
+
def device_space_path
|
69
|
+
return @json_hash[:deviceSpacePath]
|
70
|
+
end
|
71
|
+
|
72
|
+
def row_type
|
73
|
+
return @json_hash[:rowType]
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class MessageResponse
|
2
|
+
def initialize(response_json_hash)
|
3
|
+
@response_json_hash = response_json_hash
|
4
|
+
end
|
5
|
+
|
6
|
+
def type
|
7
|
+
return @response_json_hash[:type]
|
8
|
+
end
|
9
|
+
|
10
|
+
def message_key
|
11
|
+
return @response_json_hash[:messageKey]
|
12
|
+
end
|
13
|
+
|
14
|
+
def localized_message
|
15
|
+
return @response_json_hash[:localizedMessage]
|
16
|
+
end
|
17
|
+
|
18
|
+
def is_success
|
19
|
+
return message_key().include? "success"
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module ErrorMessage
|
2
|
+
MISSING_BASE_URL = "Missing base URL! Please check that the app parameter is set and try again"
|
3
|
+
MISSING_CREDENTIALS_USERNAME = "Missing authentication credentials! Check that your username is set and try again"
|
4
|
+
MISSING_CREDENTIALS_PASSWORD = "Missing authentication credentials! Check that your password is set and try again"
|
5
|
+
FILE_NOT_FOUND = "File ont found! Please check that the file exists and try again"
|
6
|
+
FILE_EXTNAME_NOT_VALID = "File not found! Please check that the file exists and try again"
|
7
|
+
INVALID_PATH = "Could not read content from"
|
8
|
+
|
9
|
+
def self.artifact_not_found(artifact_path)
|
10
|
+
"Artifact(s) not found in path: #{artifact_path}. Please check that the file exists and try again"
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.url_not_available(url)
|
14
|
+
"URL not available: #{url}. Please check the network connection and try again"
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.artifact_extname_not_valid(extname)
|
18
|
+
"The artifact ext '#{extname}' not valid! Make sure that file extname *.apk or *.ipa and try again"
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
class PingResponse
|
2
|
+
def initialize(response_json_hash)
|
3
|
+
@response_json_hash = response_json_hash
|
4
|
+
end
|
5
|
+
|
6
|
+
def results
|
7
|
+
return PingResults.new(@response_json_hash[:results])
|
8
|
+
end
|
9
|
+
|
10
|
+
def messages
|
11
|
+
return @response_json_hash[:messages]
|
12
|
+
end
|
13
|
+
|
14
|
+
class PingResults
|
15
|
+
def initialize(json_hash)
|
16
|
+
@json_hash = json_hash
|
17
|
+
end
|
18
|
+
|
19
|
+
def api_version
|
20
|
+
return @json_hash[:apiVersion]
|
21
|
+
end
|
22
|
+
|
23
|
+
def vsp_version
|
24
|
+
return @json_hash[:vspVersion]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,211 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fastlane-plugin-mobileiron
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Roman Ivannikov
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-02-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday_middleware
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pry
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec_junit_formatter
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.49.1
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.49.1
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop-require_tools
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: fastlane
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 2.127.1
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 2.127.1
|
167
|
+
description:
|
168
|
+
email:
|
169
|
+
- ivannikov.rv@google.com
|
170
|
+
executables: []
|
171
|
+
extensions: []
|
172
|
+
extra_rdoc_files: []
|
173
|
+
files:
|
174
|
+
- LICENSE.txt
|
175
|
+
- README.md
|
176
|
+
- lib/fastlane/plugin/mobileiron.rb
|
177
|
+
- lib/fastlane/plugin/mobileiron/actions/mobileiron_action.rb
|
178
|
+
- lib/fastlane/plugin/mobileiron/client/mobileiron_api_client.rb
|
179
|
+
- lib/fastlane/plugin/mobileiron/helper/appstore_apps_labels_response.rb
|
180
|
+
- lib/fastlane/plugin/mobileiron/helper/appstore_apps_message_response.rb
|
181
|
+
- lib/fastlane/plugin/mobileiron/helper/appstore_inhause_response.rb
|
182
|
+
- lib/fastlane/plugin/mobileiron/helper/labels_summary_response.rb
|
183
|
+
- lib/fastlane/plugin/mobileiron/helper/message_response.rb
|
184
|
+
- lib/fastlane/plugin/mobileiron/helper/mobileiron_error_message.rb
|
185
|
+
- lib/fastlane/plugin/mobileiron/helper/mobileiron_helper.rb
|
186
|
+
- lib/fastlane/plugin/mobileiron/helper/ping_response.rb
|
187
|
+
- lib/fastlane/plugin/mobileiron/version.rb
|
188
|
+
homepage: https://github.com/RIvannikov/fastlane-plugin-mobileiron
|
189
|
+
licenses:
|
190
|
+
- MIT
|
191
|
+
metadata: {}
|
192
|
+
post_install_message:
|
193
|
+
rdoc_options: []
|
194
|
+
require_paths:
|
195
|
+
- lib
|
196
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - ">="
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: 2.3.0
|
201
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
|
+
requirements:
|
203
|
+
- - ">="
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: '0'
|
206
|
+
requirements: []
|
207
|
+
rubygems_version: 3.1.4
|
208
|
+
signing_key:
|
209
|
+
specification_version: 4
|
210
|
+
summary: Release your beta builds to Mobileiron In-Hause instance. https://www.mobileiron.com
|
211
|
+
test_files: []
|