Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional S3 options for community S3-compatible implementations like minio #117

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ def self.run(config)
params[:override_file_name] = config[:override_file_name]
params[:files] = config[:files]
params[:folder] = config[:folder]
params[:force_path_style] = config[:force_path_style]
params[:http_wire_trace] = config[:http_wire_trace]

# Pulling parameters for other uses
s3_region = params[:region]
Expand All @@ -70,6 +72,8 @@ def self.run(config)
s3_profile = params[:aws_profile]
s3_bucket = params[:bucket]
s3_endpoint = params[:endpoint]
s3_force_path_style = params[:force_path_style]
s3_http_wire_trace = params[:http_wire_trace]
apk_file = params[:apk]
ipa_file = params[:ipa]
release_notes = params[:release_notes]
Expand All @@ -92,6 +96,8 @@ def self.run(config)
client_cfg[:endpoint] = s3_endpoint if s3_endpoint
client_cfg[:profile] = s3_profile if s3_profile
client_cfg[:credentials] = Aws::Credentials.new(s3_access_key, s3_secret_access_key, s3_session_token) if s3_access_key && s3_secret_access_key
client_cfg[:force_path_style] = s3_force_path_style
client_cfg[:http_wire_trace] = s3_http_wire_trace

s3_client = Aws::S3::Client.new(client_cfg)

Expand Down Expand Up @@ -811,7 +817,19 @@ def self.available_options
description: "Path to the folder you want to upload",
is_string: true,
optional: true,
default_value: nil)
default_value: nil),
FastlaneCore::ConfigItem.new(key: :force_path_style,
env_name: "",
description: "Use path style for custom s3 compatible storage",
optional: true,
type: Boolean,
default_value: false),
FastlaneCore::ConfigItem.new(key: :http_wire_trace,
env_name: "",
description: "dump http trace",
optional: true,
type: Boolean,
default_value: false),
]
end

Expand Down