fastlane-plugin-s3_cert 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +80 -0
- data/lib/fastlane/plugin/s3_cert/actions/s3_cert_action.rb +211 -0
- data/lib/fastlane/plugin/s3_cert/actions/s3_upload_certs_action.rb +114 -0
- data/lib/fastlane/plugin/s3_cert/helper/s3_cert_helper.rb +25 -0
- data/lib/fastlane/plugin/s3_cert/version.rb +5 -0
- data/lib/fastlane/plugin/s3_cert.rb +16 -0
- metadata +224 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fe3482fecded6c10bd602fd7beb906ae50a3406e4389669f7001ab4aa531e9cc
|
4
|
+
data.tar.gz: 351a5d31c2214d726633e748f44c5f8f00d4c525e8ecf326e04496362c0f9e44
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1d16d7c3f6d9ae3994696e3ff4730235b673571a21c91ff38c95f18c9ebed88326a54f456227ecb78f89397656ad344d01435bec6a4e9eb9b02633760f2d6e79
|
7
|
+
data.tar.gz: 14c6a7d80bdd3208844ac5bb2aa777ff57a6b8c5f1ae571fe89764de13fc6e2c1bf55ffe8fc095db9ca4f2a5f22f3cff7c630d98e9654949d0ec5acd8bd86fd6
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Josh Lesch <josh.r.lesch@gmail.com>
|
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 all
|
13
|
+
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 THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
# s3_cert plugin
|
2
|
+
|
3
|
+
[![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-s3_cert)
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-s3_cert`, add it to your project by running:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
fastlane add_plugin s3_cert
|
11
|
+
```
|
12
|
+
|
13
|
+
## About s3_cert
|
14
|
+
|
15
|
+
Store and install KMS encrypted Certs from s3.
|
16
|
+
|
17
|
+
To use this plugin, you will need read/write access to AWS S3 and a KMS key.
|
18
|
+
|
19
|
+
First create a bucket or object in an existing bucket to store your certs,
|
20
|
+
|
21
|
+
Generate a KMS key to encrypt the certs that are going to be uploaded.
|
22
|
+
|
23
|
+
Gather any certs you want uploaded into a directory. Currently only unencyrpted certs downloaded from the Dev Portal ending in `.cer` are supported.
|
24
|
+
|
25
|
+
You can then upload your certs by using the `s3_upload_cert` action
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
s3_upload_certs(
|
29
|
+
bucket: "<your_bucket>",
|
30
|
+
object_key: "<your_object_key>",
|
31
|
+
kms_key_id: "<kms_key_id>",
|
32
|
+
local_file_location: "/path/to/certs"
|
33
|
+
)
|
34
|
+
```
|
35
|
+
|
36
|
+
To download and install certs, use the `s3_cert` action
|
37
|
+
|
38
|
+
```ruby
|
39
|
+
s3_cert(
|
40
|
+
spaceship_username: "<login_to_dev_portal>",
|
41
|
+
bucket: "<your_bucket>",
|
42
|
+
object_key: "<your_object_key",
|
43
|
+
kms_key_id: "<kms_key_id>"
|
44
|
+
)
|
45
|
+
```
|
46
|
+
|
47
|
+
## Example
|
48
|
+
|
49
|
+
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
|
50
|
+
|
51
|
+
**Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
|
52
|
+
|
53
|
+
## Run tests for this plugin
|
54
|
+
|
55
|
+
To run both the tests, and code style validation, run
|
56
|
+
|
57
|
+
```
|
58
|
+
rake
|
59
|
+
```
|
60
|
+
|
61
|
+
To automatically fix many of the styling issues, use
|
62
|
+
```
|
63
|
+
rubocop -a
|
64
|
+
```
|
65
|
+
|
66
|
+
## Issues and Feedback
|
67
|
+
|
68
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
69
|
+
|
70
|
+
## Troubleshooting
|
71
|
+
|
72
|
+
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
73
|
+
|
74
|
+
## Using _fastlane_ Plugins
|
75
|
+
|
76
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
77
|
+
|
78
|
+
## About _fastlane_
|
79
|
+
|
80
|
+
_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,211 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require 'fastlane_core/cert_checker'
|
3
|
+
require_relative '../helper/s3_cert_helper'
|
4
|
+
|
5
|
+
|
6
|
+
module Fastlane
|
7
|
+
module Actions
|
8
|
+
class S3CertAction < Action
|
9
|
+
def self.run(params)
|
10
|
+
require 'aws-sdk-s3'
|
11
|
+
require 'spaceship'
|
12
|
+
Helper::S3CertHelper.check_required_options(params)
|
13
|
+
access_key = params[:aws_access_key_id]
|
14
|
+
secret_key = params[:aws_secret_access_key]
|
15
|
+
region = params[:aws_region]
|
16
|
+
s3_bucket = params[:bucket]
|
17
|
+
s3_object_key = params[:object_key]
|
18
|
+
kms_key_id = params[:kms_key_id]
|
19
|
+
spaceship_username = params[:spaceship_username]
|
20
|
+
|
21
|
+
UI.user_error!("No spaceship username provided, please use spaceship_username: or with ENV['SPACESHIP_USERNAME']") unless spaceship_username.to_s.length > 0
|
22
|
+
|
23
|
+
if access_key
|
24
|
+
Aws.config.update({
|
25
|
+
region: region,
|
26
|
+
credentials: Aws::Credentials.new(access_key, secret_key)
|
27
|
+
})
|
28
|
+
end
|
29
|
+
s3 = Aws::S3::Resource.new
|
30
|
+
kms = Aws::KMS::Client.new
|
31
|
+
Spaceship.login(spaceship_username)
|
32
|
+
|
33
|
+
if params[:spaceship_team_id]
|
34
|
+
Spaceship.select_team(team_id: params[:spaceship_team_id])
|
35
|
+
end
|
36
|
+
|
37
|
+
client = Aws::S3::Encryption::Client.new(
|
38
|
+
kms_key_id: kms_key_id,
|
39
|
+
kms_client: kms
|
40
|
+
)
|
41
|
+
|
42
|
+
resp = s3.bucket(s3_bucket).objects(prefix: s3_object_key).collect(&:key)
|
43
|
+
Dir.mktmpdir { |dir|
|
44
|
+
for r in resp
|
45
|
+
if File.extname(r).include? "cer"
|
46
|
+
obj = s3.bucket(s3_bucket).object(r)
|
47
|
+
obj.get(response_target: File.join(dir, File.basename(r)))
|
48
|
+
client.get_object(
|
49
|
+
response_target: File.join(dir, File.basename(r)),
|
50
|
+
bucket: s3_bucket,
|
51
|
+
key: File.join(s3_object_key, File.basename(r))
|
52
|
+
)
|
53
|
+
|
54
|
+
raw_cert = File.read(File.join(dir, File.basename(r)))
|
55
|
+
parsed_cert = OpenSSL::X509::Certificate.new(raw_cert)
|
56
|
+
|
57
|
+
uid = parsed_cert.subject.to_s.match(/UID=([A-Z0-9]+)/).captures[0]
|
58
|
+
found = false
|
59
|
+
# Would really like to make this call once
|
60
|
+
Spaceship.certificate.all.find do |cert|
|
61
|
+
if cert.owner_id == uid
|
62
|
+
UI.success("Found the cert #{r} in the Apple Developer Portal.")
|
63
|
+
now = Time.now
|
64
|
+
if parsed_cert.not_after - now < 0
|
65
|
+
UI.important("The cert: #{r} with UID: #{uid} is expired and wont be installed. Create a new one and upload it to s3")
|
66
|
+
break
|
67
|
+
end
|
68
|
+
found = true
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
unless found
|
73
|
+
UI.important("Unable to find cert: #{r} in the Apple Developer Portal, skipping install..")
|
74
|
+
next
|
75
|
+
end
|
76
|
+
|
77
|
+
if FastlaneCore::CertChecker.installed?(File.join(dir, File.basename(r)), in_keychain: params[:keychain_name])
|
78
|
+
UI.important("Certificate '#{File.join(dir, File.basename(r))}' is already installed on this machine")
|
79
|
+
else
|
80
|
+
if params[:delete_expired_cert]
|
81
|
+
UI.message("Checking to see if its expired..")
|
82
|
+
expired_cert = self.check_for_expired_cert(File.join(dir, File.basename(r)), params[:keychain_name])
|
83
|
+
if expired_cert
|
84
|
+
self.delete_cert(expired_cert)
|
85
|
+
else
|
86
|
+
UI.message("Certificate is valid!")
|
87
|
+
end
|
88
|
+
end
|
89
|
+
keychain_path = FastlaneCore::Helper.keychain_path(params[:keychain_name])
|
90
|
+
FastlaneCore::KeychainImporter.import_file(File.join(dir, File.basename(r)),
|
91
|
+
keychain_path,
|
92
|
+
keychain_password: params[:keychain_password],
|
93
|
+
output: FastlaneCore::Globals.verbose?)
|
94
|
+
|
95
|
+
UI.success("Installed cert: '#{File.join(dir, File.basename(r))}'")
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
}
|
100
|
+
end
|
101
|
+
|
102
|
+
def self.check_for_expired_cert(path, keychain)
|
103
|
+
cert_name = OpenSSL::X509::Certificate.new(File.read(path)).subject.to_s.match(/CN=(.*?)\//)[1]
|
104
|
+
installed_certs = sh("security find-identity -p codesigning #{keychain}")
|
105
|
+
installed_certs.split("\n").each do |c|
|
106
|
+
if c.include?("CSSMERR_TP_CERT_EXPIRED")
|
107
|
+
expired_cert_name = c.match(/\"(.*)\"/)[1]
|
108
|
+
if expired_cert_name == cert_name
|
109
|
+
UI.important("#{cert_name} is expired")
|
110
|
+
return expired_cert_name
|
111
|
+
else
|
112
|
+
return nil
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
def self.delete_cert(cert_name)
|
119
|
+
UI.important("Deleting cert #{cert_name}")
|
120
|
+
sh("security delete-certificate -c '#{cert_name}'")
|
121
|
+
end
|
122
|
+
|
123
|
+
def self.description
|
124
|
+
"Pull Certs from s3 and install them into keychain."
|
125
|
+
end
|
126
|
+
|
127
|
+
def self.authors
|
128
|
+
["Josh Lesch"]
|
129
|
+
end
|
130
|
+
|
131
|
+
def self.return_value
|
132
|
+
# If your method provides a return value, you can describe here what it does
|
133
|
+
end
|
134
|
+
|
135
|
+
def self.details
|
136
|
+
# Optional:
|
137
|
+
"Store your certificates securely in s3 and pull down automatically when needed."
|
138
|
+
end
|
139
|
+
|
140
|
+
def self.available_options
|
141
|
+
[
|
142
|
+
FastlaneCore::ConfigItem.new(key: :aws_access_key_id,
|
143
|
+
env_name: "AWS_ACCESS_KEY_ID",
|
144
|
+
description: "Aws access key id",
|
145
|
+
optional: true,
|
146
|
+
type: String),
|
147
|
+
FastlaneCore::ConfigItem.new(key: :aws_secret_access_key,
|
148
|
+
env_name: "AWS_SECRET_ACCESS_KEY",
|
149
|
+
description: "Aws secret access key",
|
150
|
+
optional: true,
|
151
|
+
type: String),
|
152
|
+
FastlaneCore::ConfigItem.new(key: :aws_region,
|
153
|
+
env_name: "AWS_REGION",
|
154
|
+
description: "Aws region",
|
155
|
+
optional: true,
|
156
|
+
type: String),
|
157
|
+
FastlaneCore::ConfigItem.new(key: :bucket,
|
158
|
+
env_name: "S3_BUCKET",
|
159
|
+
description: "S3 bucket",
|
160
|
+
optional: false,
|
161
|
+
type: String),
|
162
|
+
FastlaneCore::ConfigItem.new(key: :object_key,
|
163
|
+
env_name: "S3_OBJECT_KEY",
|
164
|
+
description: "S3 object key",
|
165
|
+
optional: false,
|
166
|
+
type: String),
|
167
|
+
FastlaneCore::ConfigItem.new(key: :kms_key_id,
|
168
|
+
env_name: "KMS_KEY_ID",
|
169
|
+
description: "KMS key id to encrypt and decrypt files in S3",
|
170
|
+
optional: false,
|
171
|
+
type: String),
|
172
|
+
FastlaneCore::ConfigItem.new(key: :spaceship_team_id,
|
173
|
+
env_name: "SPACESHIP_TEAM_ID",
|
174
|
+
description: "Team id to select dev portal team if on multiple teams",
|
175
|
+
optional: true,
|
176
|
+
type: String),
|
177
|
+
FastlaneCore::ConfigItem.new(key: :spaceship_username,
|
178
|
+
env_name: "SPACESHIP_USERNAME",
|
179
|
+
description: "Username required for Spaceship to log into the Apple Dev Portal",
|
180
|
+
optional: false,
|
181
|
+
type: String),
|
182
|
+
FastlaneCore::ConfigItem.new(key: :keychain_password,
|
183
|
+
env_name: "KEYCHAIN_PASSWORD",
|
184
|
+
description: "Password to keychain",
|
185
|
+
optional: true,
|
186
|
+
type: String),
|
187
|
+
FastlaneCore::ConfigItem.new(key: :keychain_name,
|
188
|
+
env_name: "KEYCHAIN_NAME",
|
189
|
+
description: "Name of keychain where certs will be installeds",
|
190
|
+
default_value: "login.keychain",
|
191
|
+
optional: true,
|
192
|
+
type: String),
|
193
|
+
FastlaneCore::ConfigItem.new(key: :delete_expired_cert,
|
194
|
+
description: "Option to delete existing cert if expired",
|
195
|
+
optional: true,
|
196
|
+
default_value: false,
|
197
|
+
is_string: false)
|
198
|
+
|
199
|
+
]
|
200
|
+
end
|
201
|
+
|
202
|
+
def self.is_supported?(platform)
|
203
|
+
# Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
|
204
|
+
# See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
|
205
|
+
#
|
206
|
+
# [:ios, :mac, :android].include?(platform)
|
207
|
+
true
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
211
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require 'fastlane_core/cert_checker'
|
3
|
+
require_relative '../helper/s3_cert_helper'
|
4
|
+
|
5
|
+
module Fastlane
|
6
|
+
module Actions
|
7
|
+
class S3UploadCertsAction < Action
|
8
|
+
def self.run(params)
|
9
|
+
require 'aws-sdk-s3'
|
10
|
+
Helper::S3CertHelper.check_required_options(params)
|
11
|
+
access_key = params[:aws_access_key_id]
|
12
|
+
secret_key = params[:aws_secret_access_key]
|
13
|
+
region = params[:aws_region]
|
14
|
+
s3_bucket = params[:bucket]
|
15
|
+
s3_object_key = params[:object_key]
|
16
|
+
kms_key_id = params[:kms_key_id]
|
17
|
+
|
18
|
+
if access_key
|
19
|
+
Aws.config.update({
|
20
|
+
region: region,
|
21
|
+
credentials: Aws::Credentials.new(access_key, secret_key)
|
22
|
+
})
|
23
|
+
end
|
24
|
+
|
25
|
+
kms = Aws::KMS::Client.new
|
26
|
+
|
27
|
+
client = Aws::S3::Encryption::Client.new(
|
28
|
+
kms_key_id: kms_key_id,
|
29
|
+
kms_client: kms)
|
30
|
+
|
31
|
+
files = Dir[File.join(params[:local_file_location], "*")]
|
32
|
+
for f in files
|
33
|
+
if File.extname(f).include? "cer"
|
34
|
+
UI.important("Uploading: #{f}")
|
35
|
+
File.open(f, 'rb') do |file|
|
36
|
+
client.put_object(
|
37
|
+
body: file,
|
38
|
+
bucket: s3_bucket,
|
39
|
+
key: File.join(s3_object_key, File.basename(f))
|
40
|
+
)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
UI.message("Successfully uploaded all the certs in #{params[:local_file_location]}")
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.description
|
49
|
+
"Upload encrypted certs to s3"
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.authors
|
53
|
+
["Josh Lesch"]
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.return_value
|
57
|
+
# If your method provides a return value, you can describe here what it does
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.details
|
61
|
+
# Optional:
|
62
|
+
"Store your certificates securely in s3 and pull down automatically when needed."
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.available_options
|
66
|
+
[
|
67
|
+
FastlaneCore::ConfigItem.new(key: :aws_access_key_id,
|
68
|
+
env_name: "AWS_ACCESS_KEY_ID",
|
69
|
+
description: "Aws access key id",
|
70
|
+
optional: true,
|
71
|
+
type: String),
|
72
|
+
FastlaneCore::ConfigItem.new(key: :aws_secret_access_key,
|
73
|
+
env_name: "AWS_SECRET_ACCESS_KEY",
|
74
|
+
description: "Aws secret access key",
|
75
|
+
optional: true,
|
76
|
+
type: String),
|
77
|
+
FastlaneCore::ConfigItem.new(key: :aws_region,
|
78
|
+
env_name: "AWS_REGION",
|
79
|
+
description: "Aws region",
|
80
|
+
optional: true,
|
81
|
+
type: String),
|
82
|
+
FastlaneCore::ConfigItem.new(key: :bucket,
|
83
|
+
env_name: "S3_BUCKET",
|
84
|
+
description: "S3 bucket",
|
85
|
+
optional: true,
|
86
|
+
type: String),
|
87
|
+
FastlaneCore::ConfigItem.new(key: :object_key,
|
88
|
+
env_name: "S3_OBJECT_KEY",
|
89
|
+
description: "S3 object key",
|
90
|
+
optional: true,
|
91
|
+
type: String),
|
92
|
+
FastlaneCore::ConfigItem.new(key: :kms_key_id,
|
93
|
+
env_name: "KMS_KEY_ID",
|
94
|
+
description: "KMS key id to encrypt and decrypt files in S3",
|
95
|
+
optional: true,
|
96
|
+
type: String),
|
97
|
+
FastlaneCore::ConfigItem.new(key: :local_file_location,
|
98
|
+
env_name: "FILE_LOCATION",
|
99
|
+
description: "KMS key id to encrypt and decrypt files in S3",
|
100
|
+
optional: true,
|
101
|
+
type: String),
|
102
|
+
]
|
103
|
+
end
|
104
|
+
|
105
|
+
def self.is_supported?(platform)
|
106
|
+
# Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
|
107
|
+
# See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
|
108
|
+
#
|
109
|
+
# [:ios, :mac, :android].include?(platform)
|
110
|
+
true
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fastlane_core/ui/ui'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
|
5
|
+
|
6
|
+
module Helper
|
7
|
+
class S3CertHelper
|
8
|
+
def self.check_required_options(params)
|
9
|
+
UI.user_error!("No KMS key id provided, please use kms_key_id: or with ENV['KMS_KEY_ID']") unless params[:kms_key_id].to_s.length > 0
|
10
|
+
UI.user_error!("No bucket provided, please use bucket: or with ENV['S3_BUCKET']") unless params[:bucket].to_s.length > 0
|
11
|
+
UI.user_error!("No object_key provided, please use object_key: or with ENV['S3_OBJECT_KEY']") unless params[:object_key].to_s.length > 0
|
12
|
+
|
13
|
+
if params[:aws_access_key_id]
|
14
|
+
UI.user_error!("No secret access key provided, please use aws_secret_access_key: or with ENV['AWS_SECRET_ACCESS_KEY']") unless params[:aws_secret_access_key].to_s.length > 0
|
15
|
+
UI.user_error!("No region provided, please use aws_region: or with ENV['AWS_REGION']") unless params[:aws_region].to_s.length > 0
|
16
|
+
end
|
17
|
+
|
18
|
+
if params[:aws_secret_access_key]
|
19
|
+
UI.user_error!("No access key id provided, please use aws_access_key_id: or with ENV['AWS_ACCESS_KEY_ID']") unless params[:aws_access_key_id].to_s.length > 0
|
20
|
+
UI.user_error!("No region provided, please use aws_region: or with ENV['AWS_REGION']") unless params[:aws_region].to_s.length > 0
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'fastlane/plugin/s3_cert/version'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module S3Cert
|
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::S3Cert.all_classes.each do |current|
|
15
|
+
require current
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,224 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fastlane-plugin-s3_cert
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Josh Lesch
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-01-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: aws-sdk-s3
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: utils
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.2.4
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.2.4
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: commander-fastlane
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 4.4.6
|
48
|
+
- - "<"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 5.0.0
|
51
|
+
type: :runtime
|
52
|
+
prerelease: false
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: 4.4.6
|
58
|
+
- - "<"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 5.0.0
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: pry
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: bundler
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: rspec
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: rspec_junit_formatter
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: rake
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: rubocop
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - '='
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: 0.49.1
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - '='
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 0.49.1
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: rubocop-require_tools
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
type: :development
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: simplecov
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
- !ruby/object:Gem::Dependency
|
174
|
+
name: fastlane
|
175
|
+
requirement: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: 2.113.0
|
180
|
+
type: :development
|
181
|
+
prerelease: false
|
182
|
+
version_requirements: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: 2.113.0
|
187
|
+
description:
|
188
|
+
email: josh.r.lesch@gmail.com
|
189
|
+
executables: []
|
190
|
+
extensions: []
|
191
|
+
extra_rdoc_files: []
|
192
|
+
files:
|
193
|
+
- LICENSE
|
194
|
+
- README.md
|
195
|
+
- lib/fastlane/plugin/s3_cert.rb
|
196
|
+
- lib/fastlane/plugin/s3_cert/actions/s3_cert_action.rb
|
197
|
+
- lib/fastlane/plugin/s3_cert/actions/s3_upload_certs_action.rb
|
198
|
+
- lib/fastlane/plugin/s3_cert/helper/s3_cert_helper.rb
|
199
|
+
- lib/fastlane/plugin/s3_cert/version.rb
|
200
|
+
homepage: https://github.com/joshrlesch/fastlane-plugin-s3_cert
|
201
|
+
licenses:
|
202
|
+
- MIT
|
203
|
+
metadata: {}
|
204
|
+
post_install_message:
|
205
|
+
rdoc_options: []
|
206
|
+
require_paths:
|
207
|
+
- lib
|
208
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
209
|
+
requirements:
|
210
|
+
- - ">="
|
211
|
+
- !ruby/object:Gem::Version
|
212
|
+
version: '0'
|
213
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
214
|
+
requirements:
|
215
|
+
- - ">="
|
216
|
+
- !ruby/object:Gem::Version
|
217
|
+
version: '0'
|
218
|
+
requirements: []
|
219
|
+
rubyforge_project:
|
220
|
+
rubygems_version: 2.7.6
|
221
|
+
signing_key:
|
222
|
+
specification_version: 4
|
223
|
+
summary: Store and install encrypted Certs from s3
|
224
|
+
test_files: []
|