Giter Site home page Giter Site logo

fastlane-plugin-s3's People

Contributors

aure77 avatar claireduf avatar col avatar ctaintor avatar dlethin avatar felginep avatar fhickman avatar florianbuerger avatar hanno-jonlay avatar joohae-kim avatar joshdholtz avatar kusakusakusa avatar lesykmelnychuk avatar levibostian avatar maximusmccann avatar mcasper avatar mhadaily avatar nicolasbraun avatar omerduzyol avatar oronbz avatar revolter avatar schluete avatar tfaieta avatar timothy-volvo avatar truth3 avatar yousefhamza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fastlane-plugin-s3's Issues

no implicit conversion of nil into String

Updated to 1.4.0 from 1.1.1, I am getting the error "no implicit conversion of nil into String" in the aws_s3 fastlane step.

I can not provide much more information, since I can not see any more logs in the terminal. For now, I reverted back to version 1.1.1.

override filename in s3

Hi,
I have a specific need to upload the ipa to s3 multiple times and with different names.

I thought it would be nice to add another parameter to the action: file_name which will override the default ipa param that is currently also being used for the uploaded file_name.

I can think of scenarios where this could be relevant for other people as well.
If you're with me on this, I could make a PR for this feature, if not, I'll develop it for local use only.

Let me know what you think or if you need more information regarding this feature.

How not upload xcarchive.zip and .dSYM.zip?

Hello, how do I upload only .ipa and .plist files?

After I upgrade to a new version (1.4), every time I upload the file, it is also uploading xcarchive.zip, I think this file is not necessary for my use case. You would have to add a parameter so that it is not sent to s3. Really interesting to .dSYM

`s3_path` param does not expect trailing slash for files/folders

The default value of s3_path for APKs and IPAs is "#{version_code}_#{version_name}/" unless s3_path

The default value of s3_path for files is "files" unless s3_path

You can see that for APKs, a trailing slash is expected, and for files, it is not. This means that files get uploaded to subdirectory (with a 0-length title) of the directory that the APKs/IPAs get uploaded to.

image

For reference, this is what our invocation looks like -

    aws_s3(
      access_key: ENV['AWS_ACCESS_KEY_ID'],
      secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'],
      bucket: ENV['ARTIFACTS_S3_BUCKET'],
      region: "eu-west-1",
      files: [ 
        "#{lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH]}" 
      ],
      path: "#{ENV["CIRCLE_BUILD_NUM"]}",
      app_directory: artifacts_root + "prod/android",
      upload_metadata: true
    )

AWS S3 access denied error when trying to push a build to S3

Hi,

Thank you for creating and maintaining this plugin.

I've managed to get this plugin working using my personal AWS credentials to get an iOS app build uploaded to S3.

We're working on getting this setup in CI (Circle) and would like to create a dedicated IAM user for use in CI with the bare minimum AWS permissions to allow builds to be uploaded to S3. Before we get this into CI, I am testing with the credentials on my machine, so any CI related factors are not at play here.

I am running into Aws::S3::Errors::AccessDenied: [!] Access Denied error after a few attempts trying to set the right permissions on the new IAM account. Wanted to share what I have and try to get help from the community on S3 permissions that work.

We have a bucket dedicated to builds, let's call it bucket-name and the permissions I've tried are as follows, based on this S3 help doc:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "s3:ListBucket",
            "Resource": "arn:aws:s3:::bucket-name"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "s3:*Object",
            "Resource": "arn:aws:s3:::bucket-name/*"
        }
    ]
}

I was still getting the access denied error and so I expanded the permissions to allow the client to be able to list buckets (as per AWS docs):

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "s3:ListBucket",
            "Resource": "arn:aws:s3:::bucket-name"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "s3:*Object",
            "Resource": "arn:aws:s3:::bucket-name/*"
        },
        {
            "Sid": "VisualEditor2",
            "Effect": "Allow",
            "Action": "s3:ListAllMyBuckets",
            "Resource": "*"
        }
        {
            "Sid": "VisualEditor3",
            "Effect": "Allow",
            "Action": "s3:GetBucketLocation",
            "Resource": "*"
        }
    ]
}

But I am still getting the same error:

Aws::S3::Errors::AccessDenied: [!] Access Denied

Any help would be much appreciated!

Environment:

$ ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
$ bundle list | grep aws
  * aws-eventstream (1.0.3)
  * aws-sdk (2.11.292)
  * aws-sdk-core (2.11.292)
  * aws-sdk-resources (2.11.292)
  * aws-sigv4 (1.1.0)
  * fastlane-plugin-aws_s3 (1.6.0)
$ bundle list | grep fastlane
  * commander-fastlane (4.4.6)
  * fastlane (2.125.2)
  * fastlane-plugin-aws_s3 (1.6.0)
$

AWSFile

It would be very useful if can use default evironments like Gemfile, Appfile, Matchfile...

Update aws-sdk version

Hi here!

In my project, I use aws-sdk-s3, which is v3 version of api. Your incredible plugin depends on aws-sdk v2 ~> 2.3, which is incompatible by gem dependency resolver. Would you be open for PR with bump version of aws sdk and necessary code changes? Or it could be a reason why version bump is not acceptable?

Thanks!

Ruby warning after migrating from s3 action to aws_s3 plugin

I recently migrated from s3 action to aws_s3 plugin as suggested by the deprecation message of the action. Since then every time I run fastlane I receive the following warnings:

/usr/local/lib/ruby/gems/2.4.0/gems/fastlane-plugin-aws_s3-0.2.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:9: warning: already initialized constant Fastlane::Actions::SharedValues::S3_IPA_OUTPUT_PATH
/usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.9.0/fastlane/lib/fastlane/actions/s3.rb:9: warning: previous definition of S3_IPA_OUTPUT_PATH was here
/usr/local/lib/ruby/gems/2.4.0/gems/fastlane-plugin-aws_s3-0.2.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:10: warning: already initialized constant Fastlane::Actions::SharedValues::S3_DSYM_OUTPUT_PATH
/usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.9.0/fastlane/lib/fastlane/actions/s3.rb:10: warning: previous definition of S3_DSYM_OUTPUT_PATH was here
/usr/local/lib/ruby/gems/2.4.0/gems/fastlane-plugin-aws_s3-0.2.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:11: warning: already initialized constant Fastlane::Actions::SharedValues::S3_PLIST_OUTPUT_PATH
/usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.9.0/fastlane/lib/fastlane/actions/s3.rb:11: warning: previous definition of S3_PLIST_OUTPUT_PATH was here
/usr/local/lib/ruby/gems/2.4.0/gems/fastlane-plugin-aws_s3-0.2.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:12: warning: already initialized constant Fastlane::Actions::SharedValues::S3_HTML_OUTPUT_PATH
/usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.9.0/fastlane/lib/fastlane/actions/s3.rb:12: warning: previous definition of S3_HTML_OUTPUT_PATH was here
/usr/local/lib/ruby/gems/2.4.0/gems/fastlane-plugin-aws_s3-0.2.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:13: warning: already initialized constant Fastlane::Actions::SharedValues::S3_VERSION_OUTPUT_PATH
/usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.9.0/fastlane/lib/fastlane/actions/s3.rb:13: warning: previous definition of S3_VERSION_OUTPUT_PATH was here

Is there any way to suppress these warnings?

Can't use machine credentials.

Because of the way the aws keys/profile are being validated, the aws-sdk can't fall back to the credentials in the aws config file, or ec2 role.

SSL_connect returned=1 errno=0 state=error: certificate verify failed

Once I had had similar issue and resolved it by updating ruby to the 2.4.1 version (from brew). Now I'm trying to integrate S3 deployment and the aws_s3 command fails with the following stacktrace:

Seahorse::Client::NetworkingError: [!] SSL_connect returned=1 errno=0 state=error: certificate verify failed
  /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/net/protocol.rb:44:in `connect_nonblock'
  /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/net/protocol.rb:44:in `ssl_socket_connect'
  /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/net/http.rb:948:in `connect'
  /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/net/http.rb:887:in `do_start'
  /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/net/http.rb:882:in `start'
  /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/delegate.rb:83:in `method_missing'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/net_http/connection_pool.rb:285:in `start_session'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/net_http/connection_pool.rb:92:in `session_for'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/net_http/handler.rb:119:in `session'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/net_http/handler.rb:71:in `transmit'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/net_http/handler.rb:45:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/plugins/content_length.rb:12:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_request_signer.rb:88:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_request_signer.rb:23:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_host_id.rb:14:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/xml/error_handler.rb:8:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/helpful_socket_errors.rb:10:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_request_signer.rb:65:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_redirects.rb:15:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:89:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:120:in `retry_request'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:103:in `retry_if_possible'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:91:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:120:in `retry_request'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:103:in `retry_if_possible'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:91:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:120:in `retry_request'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:103:in `retry_if_possible'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:91:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_dualstack.rb:32:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_accelerate.rb:49:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_md5s.rb:31:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_expect_100_continue.rb:21:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_bucket_name_restrictions.rb:12:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_bucket_dns.rb:31:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/rest/handler.rb:7:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/user_agent.rb:12:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/plugins/endpoint.rb:41:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/param_validator.rb:21:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/plugins/raise_response_errors.rb:14:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_sse_cpk.rb:19:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_dualstack.rb:24:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_accelerate.rb:34:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/idempotency_token.rb:18:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/param_converter.rb:20:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/plugins/response_target.rb:21:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/request.rb:70:in `send_request'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-resources-2.10.34/lib/aws-sdk-resources/request.rb:24:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-resources-2.10.34/lib/aws-sdk-resources/operations.rb:41:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-resources-2.10.34/lib/aws-sdk-resources/operations.rb:87:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-resources-2.10.34/lib/aws-sdk-resources/operation_methods.rb:19:in `block in add_operation'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-plugin-aws_s3-1.0.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:413:in `upload_file'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-plugin-aws_s3-1.0.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:113:in `upload_ipa'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-plugin-aws_s3-1.0.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:87:in `run'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/runner.rb:252:in `block (2 levels) in execute_action'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/runner.rb:230:in `block in execute_action'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/runner.rb:226:in `chdir'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/runner.rb:226:in `execute_action'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/runner.rb:148:in `trigger_action_by_name'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/fast_file.rb:146:in `method_missing'
  Fastfile:34:in `block (2 levels) in parsing_binding'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/lane.rb:33:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/lane_manager.rb:52:in `cruise_lane'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/command_line_handler.rb:30:in `handle'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/commands_generator.rb:104:in `block (2 levels) in run'
  /usr/local/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.5/lib/commander/command.rb:178:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.5/lib/commander/command.rb:153:in `run'
  /usr/local/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.5/lib/commander/runner.rb:476:in `run_active_command'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:64:in `run!'
  /usr/local/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.5/lib/commander/delegates.rb:15:in `run!'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/commands_generator.rb:303:in `run'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/cli_tools_distributor.rb:66:in `take_off'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/bin/fastlane:20:in `<top (required)>'
  /usr/local/bin/fastlane:22:in `load'
  /usr/local/bin/fastlane:22:in `<top (required)>'
โœ… fastlane environment โœ…

Stack

Key Value
OS 10.12.6
Ruby 2.4.1
Bundler? true
Git git version 2.11.0 (Apple Git-81)
Installation Source /usr/local/bin/fastlane
Host Mac OS X 10.12.6 (16G29)
Ruby Lib Dir /usr/local/Cellar/ruby/2.4.1_1/lib
OpenSSL Version OpenSSL 1.0.2k 26 Jan 2017
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 8.3.3

System Locale

Variable Value
LANG en_US.UTF-8 โœ…
LC_ALL
LANGUAGE

fastlane files:

`./fastlane/Fastfile`
fastlane_version "2.53.1"

default_platform :ios

platform :ios do
  desc "Test upload"
  lane :test do
    aws_s3(
      access_key: "KEY",
      secret_access_key: "SECRET",
      ipa: "App.ipa",
      endpoint: "https://ENDPOINT.s3.amazonaws.com",
      bucket: "BUCKET",
      region: "us-east-1",
      app_directory: "builds/ios",
      path: "v{CFBundleShortVersionString}_b{CFBundleVersion}/",
      upload_metadata: true
    )
  end
end

fastlane gems

Gem Version Update-Status
fastlane 2.54.2 โœ… Up-To-Date

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-aws_s3 1.0.0 โœ… Up-To-Date
Loaded gems
Gem Version
did_you_mean 1.1.0
bundler 1.15.3
io-console 0.4.6
CFPropertyList 2.3.5
i18n 0.8.6
minitest 5.10.1
thread_safe 0.3.6
tzinfo 1.2.3
activesupport 4.2.9
public_suffix 3.0.0
addressable 2.5.2
rubyzip 1.2.1
apktools 0.7.2
aws-sigv4 1.0.1
jmespath 1.3.1
aws-sdk-core 2.10.34
aws-sdk-resources 2.10.34
aws-sdk 2.10.34
babosa 1.0.2
claide 1.0.2
fuzzy_match 2.0.4
nap 1.1.0
cocoapods-core 1.3.1
cocoapods-deintegrate 1.0.1
cocoapods-downloader 1.1.3
cocoapods-plugins 1.0.0
cocoapods-search 1.0.0
cocoapods-stats 1.0.0
netrc 0.7.8
cocoapods-trunk 1.2.0
cocoapods-try 1.1.0
colored2 3.1.2
escape 0.0.4
fourflusher 2.0.1
gh_inspector 1.0.3
molinillo 0.5.7
ruby-macho 1.1.0
nanaimo 0.2.3
xcodeproj 1.5.1
cocoapods 1.3.1
colored 1.2
highline 1.7.8
commander-fastlane 4.4.5
declarative 0.0.9
declarative-option 0.1.0
unf_ext 0.0.7.4
unf 0.1.4
domain_name 0.5.20170404
dotenv 2.2.1
excon 0.58.0
multipart-post 2.0.0
faraday 0.13.1
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
faraday_middleware 0.12.2
fastimage 2.1.0
jwt 1.5.6
little-plugger 1.1.4
multi_json 1.12.1
logging 2.2.2
memoist 0.16.0
os 0.9.6
signet 0.7.3
googleauth 0.5.3
httpclient 2.8.3
mime-types-data 3.2016.0521
mime-types 3.1
uber 0.1.0
representable 3.0.4
retriable 3.1.1
google-api-client 0.13.4
json 2.1.0
mini_magick 4.5.1
multi_xml 0.6.0
plist 3.3.0
security 0.1.3
slack-notifier 1.5.1
terminal-notifier 1.8.0
unicode-display_width 1.3.0
terminal-table 1.8.0
tty-screen 0.5.0
word_wrap 1.0.0
rouge 2.0.7
xcpretty 0.2.8
xcpretty-travis-formatter 0.0.4
fastlane-plugin-aws_s3 1.0.0

generated on: 2017-08-28


I have no clue why it happens since I have the latest ruby and openssl.

Here's related issue in the aws-sdk-core-ruby repo: amazon-archives/aws-sdk-core-ruby#166
They suggest force using bundled CA cert by adding specific directive that's normally impossible in my case. I hope I'm not the only who faces this issue so there might be a general solution.

Any ideas?

SSL_connect returned=1 errno=0 state=error: certificate verify failed (unspecified certificate verification error)

Not sure why I'm getting this error, other s3 tools work fine.

Seahorse::Client::NetworkingError: [!] SSL_connect returned=1 errno=0 state=error: certificate verify failed (unspecified certificate verification error)
  /usr/local/lib/ruby/2.6.0/net/protocol.rb:44:in `connect_nonblock'
  /usr/local/lib/ruby/2.6.0/net/protocol.rb:44:in `ssl_socket_connect'
  /usr/local/lib/ruby/2.6.0/net/http.rb:996:in `connect'
  /usr/local/lib/ruby/2.6.0/net/http.rb:930:in `do_start'
  /usr/local/lib/ruby/2.6.0/net/http.rb:925:in `start'
  /usr/local/lib/ruby/2.6.0/delegate.rb:83:in `method_missing'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/seahorse/client/net_http/connection_pool.rb:299:in `start_session'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/seahorse/client/net_http/connection_pool.rb:97:in `session_for'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/seahorse/client/net_http/handler.rb:121:in `session'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/seahorse/client/net_http/handler.rb:73:in `transmit'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/seahorse/client/net_http/handler.rb:47:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/seahorse/client/plugins/content_length.rb:15:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/plugins/s3_signer.rb:103:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/plugins/s3_signer.rb:57:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/plugins/s3_host_id.rb:15:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/xml/error_handler.rb:8:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/transfer_encoding.rb:24:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/helpful_socket_errors.rb:10:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/plugins/s3_signer.rb:83:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/plugins/redirects.rb:18:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/retry_errors.rb:346:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/retry_errors.rb:380:in `retry_request'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/retry_errors.rb:368:in `retry_if_possible'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/retry_errors.rb:357:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/retry_errors.rb:380:in `retry_request'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/retry_errors.rb:368:in `retry_if_possible'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/retry_errors.rb:357:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/retry_errors.rb:380:in `retry_request'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/retry_errors.rb:368:in `retry_if_possible'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/retry_errors.rb:357:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/plugins/dualstack.rb:34:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/plugins/accelerate.rb:50:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/plugins/md5s.rb:32:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb:24:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/plugins/expect_100_continue.rb:19:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/plugins/bucket_dns.rb:33:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/plugins/bucket_arn.rb:47:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb:32:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/rest/handler.rb:8:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/user_agent.rb:11:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/seahorse/client/plugins/endpoint.rb:45:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/param_validator.rb:24:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/seahorse/client/plugins/raise_response_errors.rb:14:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/plugins/sse_cpk.rb:22:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/plugins/dualstack.rb:26:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/plugins/accelerate.rb:35:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/idempotency_token.rb:17:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/param_converter.rb:24:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/aws-sdk-core/plugins/response_paging.rb:10:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/seahorse/client/plugins/response_target.rb:23:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-core-3.98.0/lib/seahorse/client/request.rb:70:in `send_request'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/client.rb:9567:in `put_object'
  /usr/local/lib/ruby/gems/2.6.0/gems/aws-sdk-s3-1.67.1/lib/aws-sdk-s3/bucket.rb:523:in `put_object'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-plugin-aws_s3-1.8.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:517:in `upload_file'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-plugin-aws_s3-1.8.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:321:in `upload_apk'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-plugin-aws_s3-1.8.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:107:in `run'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/runner.rb:261:in `block (2 levels) in execute_action'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/runner.rb:253:in `block in execute_action'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/runner.rb:227:in `chdir'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
  Fastfile:40:in `block (2 levels) in parsing_binding'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/lane.rb:33:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
  /usr/local/lib/ruby/gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
  /usr/local/lib/ruby/gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
  /usr/local/lib/ruby/gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
  /usr/local/lib/ruby/gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/commands_generator.rb:352:in `run'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
  /usr/local/lib/ruby/gems/2.6.0/gems/fastlane-2.149.1/bin/fastlane:23:in `<top (required)>'
  /usr/local/bin/fastlane:23:in `load'
  /usr/local/bin/fastlane:23:in `<top (required)>'

Providing empty string to disable dsym upload gives error

When providing an empty string to override the default env var DSYM_OUTPUT_PATH, the plugin complains that the path is invalid.
It looks like the check whether to upload the dSYM is just checking for a nil dsym_file string, but the string can never be nil since it would be defaulted to the DSYM_OUTPUT_PATH.

if dsym_file
          dsym_file_basename = File.basename(dsym_file)
          dsym_file_name = "#{url_part}#{dsym_file_basename}"

          dsym_file_data = File.open(dsym_file, 'rb')

          dsym_url = self.upload_file(s3_client, s3_bucket, app_directory, dsym_file_name, dsym_file_data, acl, server_side_encryption, download_endpoint, download_endpoint_replacement_regex)

          # Setting action and environment variables
          Actions.lane_context[SharedValues::S3_DSYM_OUTPUT_PATH] = dsym_url
          ENV[SharedValues::S3_DSYM_OUTPUT_PATH.to_s] = dsym_url
end

Upload different apps in the same bucket

Hi, why "it is highly suggested that you make a separate bucket for each of the apps"? In our company we are maintaining dozens of app releases in a white-label manner so it is rather inconvenient to have a separate bucket just for the release of each of theses apps. Also, AWS accounts have a limit of 100 buckets by default and each app consumes a bucket from this pool shared with other buckets not used for releasing the apps. Instead the number of objects in a bucket is unlimited.

I tried to organize one bucket for all apps configuring the path parameter to include the bundle id:

aws_s3(
    ipa: "artifacts/build/MyApp.ipa",
    path: "{CFBundleIdentifier}/v{CFBundleShortVersionString}_b{CFBundleVersion}/"
)

but I noticed that /index.html and /version.json is overwritten in the root folder of the bucket with the references to the last app uploaded. Is it possible to move these files in the folder specified by path?

Add support for alternate download endpoints?

I have a need for all the S3_*_OUTPUT_PATH env variables returned with a different s3 endpoint then is used for uploading. The use case for this that the s3 bucket we use to store our IPAs and build artifacts are front-ended by AWS Cloudfront configured with WAF. This provides us the ability to lock down public http access to our artifacts with a set of rules such as limiting by remote ip address.

The action currently supports supplying an optional endpoint, but that wasn't working for us, as we do not setup any policies in IAM to allow PUTs to cloudfront ( I'm not even sure how that works or is supported).

I have a fork with a commit which resolves the problem for us. Would you consider merging it if i submit a PR?

Thanks.


BTW, Thanks for sharing this plugin/code. I had written my own code in our build over a year ago for supporting OTA app downloads when we were hosting our artifacts in a different repository. When we recently needed to switch to s3, I came across your plugin and was not only able to upload my artifacts to s3, but I was able to rip out all my code for generating the html and plist metadata for supporting adhoc OTA installs. Makes my Fastlane so much cleaner.

Errors when trying to upload upload an asset to s3

Hi,

Thanks for creating this plugin! We recently switched to it, but have been getting a Access Denied error, and are trying to figure out why. The IAM user that upload the access hasn't changed, just the gem we use to upload the asset. I've attached an example of the policy attached to the IAM user, is there a set of permissions that this plugin needs? I suspect PEKAC on my part, so any help would be much appreciated! Thanks again!

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:*"
            ],
            "Resource": [
                "arn:aws:s3:::our-bucket/prefix/path/*"
            ]
        }
    ]
}

no implicit conversion of nil into String

I've run into an issue in Fastlane where aws_s3 fails with a rather cryptic no implicit conversion of nil into String.
This is my first time using Fastlane (and ruby) so please forgive me if this is simple 101 stuff (searching didn't yield any useful hits. I suppose it is possible I was searching for the wrong things).

Here is a bit more context:
`[19:45:00]: ------------------------------------------------
[19:45:00]: --- Step: echo $XCODEBUILD_DERIVED_DATA_PATH ---
[19:45:00]: ------------------------------------------------
[19:45:00]: $ echo $XCODEBUILD_DERIVED_DATA_PATH
[19:45:00]: โ–ธ /Users/distiller/super_secret_app/ios/build/
[19:45:00]:
[19:45:00]: /Users/distiller/super_secret_app/ios/build/
[19:45:00]: ENDOFOUTPUT
[19:45:00]: --------------------
[19:45:00]: --- Step: aws_s3 ---
[19:45:00]: --------------------
+------------------------------------+--------------------------------------------------------------------------------------+
| Lane Context |
+------------------------------------+--------------------------------------------------------------------------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios simulator |
| KEYCHAIN_PATH | ~/Library/Keychains/fastlane_tmp_keychain |
| ORIGINAL_DEFAULT_KEYCHAIN | "/Users/distiller/Library/Keychains/fastlane_tmp_keychain-db" |
| SIGH_PROFILE_TYPE | development |
| MATCH_PROVISIONING_PROFILE_MAPPING | {"com.foo.super_secret_app"=>"match Development com.foo.super_secret_app"} |
| XCODEBUILD_DERIVED_DATA_PATH | /Users/distiller/super_secret_app/ios/build/ |
+------------------------------------+--------------------------------------------------------------------------------------+
[19:45:00]: no implicit conversion of nil into String

+------+---------------------------------------------------------------+-------------+
| fastlane summary |
+------+---------------------------------------------------------------+-------------+
| Step | Action | Time (in s) |
+------+---------------------------------------------------------------+-------------+
| 1 | default_platform | 0 |
| 2 | setup_circle_ci | 0 |
| 3 | match | 2 |
| 4 | xcodebuild | 16 |
| 5 | zip -r /Users/distiller/super_secret_app/ios/Debug-iphonesi | 2 |
| 6 | echo $XCODEBUILD_DERIVED_DATA_PATH | 0 |
| ๐Ÿ’ฅ | aws_s3 | 0 |
+------+---------------------------------------------------------------+-------------+

[19:45:00]: fastlane finished with errors

Looking for related GitHub issues on fastlane/fastlane...

โžก๏ธ Deliverfile api_key: connect_api/token.rb:62:in `binread': [!] no implicit conversion of nil into String
fastlane/fastlane#19348 [closed] 1 ๐Ÿ’ฌ
3 weeks ago

โžก๏ธ google_cloud_storage TypeError: [!] no implicit conversion of nil into String
fastlane/fastlane#16836 [closed] 10 ๐Ÿ’ฌ
20 Oct 2020

โžก๏ธ latest_testflight_build_number receiving error: [!] no implicit conversion of Integer into String
fastlane/fastlane#17161 [closed] 10 ๐Ÿ’ฌ
04 Nov 2020

and 89 more at: https://github.com/fastlane/fastlane/search?q=no%20implicit%20conversion%20of%20nil%20into%20String&type=Issues&utf8=โœ“

๐Ÿ”— You can โŒ˜ + double-click on links to open them directly in your browser.
bundler: failed to load command: fastlane (/Users/distiller/.gem/ruby/2.7.3/bin/fastlane)
Traceback (most recent call last):
49: from /Users/distiller/.gem/ruby/2.7.3/bin/bundle:23:in <main>' 48: from /Users/distiller/.gem/ruby/2.7.3/bin/bundle:23:in load'
47: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/exe/bundle:37:in <top (required)>' 46: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/friendly_errors.rb:128:in with_friendly_errors'
45: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/exe/bundle:49:in block in <top (required)>' 44: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/cli.rb:24:in start'
43: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' 42: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/cli.rb:30:in dispatch'
41: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' 40: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command'
39: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' 38: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/cli.rb:474:in exec'
37: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:28:in run' 36: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:63:in kernel_load'
35: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:63:in load' 34: from /Users/distiller/.gem/ruby/2.7.3/bin/fastlane:23:in <top (required)>'
33: from /Users/distiller/.gem/ruby/2.7.3/bin/fastlane:23:in load' 32: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/bin/fastlane:23:in <top (required)>'
31: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in take_off' 30: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/commands_generator.rb:42:in start'
29: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/commands_generator.rb:353:in run' 28: from /Users/distiller/.gem/ruby/2.7.3/gems/commander-4.6.0/lib/commander/delegates.rb:18:in run!'
27: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:117:in run!' 26: from /Users/distiller/.gem/ruby/2.7.3/gems/commander-4.6.0/lib/commander/runner.rb:444:in run_active_command'
25: from /Users/distiller/.gem/ruby/2.7.3/gems/commander-4.6.0/lib/commander/command.rb:157:in run' 24: from /Users/distiller/.gem/ruby/2.7.3/gems/commander-4.6.0/lib/commander/command.rb:187:in call'
23: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/commands_generator.rb:109:in block (2 levels) in run' 22: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/command_line_handler.rb:36:in handle'
21: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/lane_manager.rb:47:in cruise_lane' 20: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/runner.rb:45:in execute'
19: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/runner.rb:45:in chdir' 18: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/runner.rb:49:in block in execute'
17: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/lane.rb:33:in call' 16: from Fastfile:80:in block (2 levels) in parsing_binding'
15: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/fast_file.rb:159:in method_missing' 14: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/runner.rb:157:in trigger_action_by_name'
13: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/runner.rb:229:in execute_action' 12: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/runner.rb:229:in chdir'
11: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/runner.rb:255:in block in execute_action' 10: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in execute_action'
9: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/runner.rb:263:in block (2 levels) in execute_action' 8: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-plugin-aws_s3-2.0.3/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:100:in run'
7: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-plugin-aws_s3-2.0.3/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:130:in upload_ipa' 6: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-plugin-aws_s3-2.0.3/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:612:in expand_path_with_substitutions_from_ipa_plist'
5: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb:45:in fetch_info_plist_file' 4: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb:82:in fetch_info_plist_with_unzip'
3: from /Users/distiller/.rubies/ruby-2.7.3/lib/ruby/2.7.0/open3.rb:281:in capture3' 2: from /Users/distiller/.rubies/ruby-2.7.3/lib/ruby/2.7.0/open3.rb:101:in popen3'
1: from /Users/distiller/.rubies/ruby-2.7.3/lib/ruby/2.7.0/open3.rb:213:in popen_run' /Users/distiller/.rubies/ruby-2.7.3/lib/ruby/2.7.0/open3.rb:213:in spawn': no implicit conversion of nil into String (TypeError)
49: from /Users/distiller/.gem/ruby/2.7.3/bin/bundle:23:in <main>' 48: from /Users/distiller/.gem/ruby/2.7.3/bin/bundle:23:in load'
47: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/exe/bundle:37:in <top (required)>' 46: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/friendly_errors.rb:128:in with_friendly_errors'
45: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/exe/bundle:49:in block in <top (required)>' 44: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/cli.rb:24:in start'
43: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' 42: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/cli.rb:30:in dispatch'
41: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' 40: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command'
39: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' 38: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/cli.rb:474:in exec'
37: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:28:in run' 36: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:63:in kernel_load'
35: from /Users/distiller/.gem/ruby/2.7.3/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:63:in load' 34: from /Users/distiller/.gem/ruby/2.7.3/bin/fastlane:23:in <top (required)>'
33: from /Users/distiller/.gem/ruby/2.7.3/bin/fastlane:23:in load' 32: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/bin/fastlane:23:in <top (required)>'
31: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in take_off' 30: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/commands_generator.rb:42:in start'
29: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/commands_generator.rb:353:in run' 28: from /Users/distiller/.gem/ruby/2.7.3/gems/commander-4.6.0/lib/commander/delegates.rb:18:in run!'
27: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:117:in run!' 26: from /Users/distiller/.gem/ruby/2.7.3/gems/commander-4.6.0/lib/commander/runner.rb:444:in run_active_command'
25: from /Users/distiller/.gem/ruby/2.7.3/gems/commander-4.6.0/lib/commander/command.rb:157:in run' 24: from /Users/distiller/.gem/ruby/2.7.3/gems/commander-4.6.0/lib/commander/command.rb:187:in call'
23: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/commands_generator.rb:109:in block (2 levels) in run' 22: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/command_line_handler.rb:36:in handle'
21: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/lane_manager.rb:47:in cruise_lane' 20: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/runner.rb:45:in execute'
19: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/runner.rb:45:in chdir' 18: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/runner.rb:49:in block in execute'
17: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/lane.rb:33:in call' 16: from Fastfile:80:in block (2 levels) in parsing_binding'
15: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/fast_file.rb:159:in method_missing' 14: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/runner.rb:157:in trigger_action_by_name'
13: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/runner.rb:229:in execute_action' 12: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/runner.rb:229:in chdir'
11: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/runner.rb:255:in block in execute_action' 10: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in execute_action'
9: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane/lib/fastlane/runner.rb:263:in block (2 levels) in execute_action' 8: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-plugin-aws_s3-2.0.3/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:100:in run'
7: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-plugin-aws_s3-2.0.3/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:130:in upload_ipa' 6: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-plugin-aws_s3-2.0.3/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:612:in expand_path_with_substitutions_from_ipa_plist'
5: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb:45:in fetch_info_plist_file' 4: from /Users/distiller/.gem/ruby/2.7.3/gems/fastlane-2.195.0/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb:82:in fetch_info_plist_with_unzip'
3: from /Users/distiller/.rubies/ruby-2.7.3/lib/ruby/2.7.0/open3.rb:281:in capture3' 2: from /Users/distiller/.rubies/ruby-2.7.3/lib/ruby/2.7.0/open3.rb:101:in popen3'
1: from /Users/distiller/.rubies/ruby-2.7.3/lib/ruby/2.7.0/open3.rb:213:in popen_run' /Users/distiller/.rubies/ruby-2.7.3/lib/ruby/2.7.0/open3.rb:213:in spawn': \e[31m[!] no implicit conversion of nil into String\e[0m (TypeError)`

The relevant part of my Fastfile is here:
aws_s3( access_key: ENV['S3_ACCESS_KEY'], secret_access_key: ENV['S3_SECRET_ACCESS_KEY'], bucket: 'super_secret-enterprise-apps', region: 'eu-west-1', ipa: '/Users/distiller/super_secret/ios/Debug-iphonesimulator/super_secret.ipa.zip', dsym: '/Users/distiller/super_secret/ios/Debug-iphonesimulator/super_secret.app.dSYM', app_directory: 'ios.com.foo.super_secret.simulator', upload_metadata: true )

I have redacted app name and company name.

If only I knew what was nil so I could set it. For a moment I thought that XCODEBUILD_DERIVED_DATA_PATH was the issue as it was blank in the Lane Context output but setting it explicitly didn't change anything.

The iOS template script is removing the download link for iPad Air 2 iOS 13.

<script type='text/javascript'> // if (/Android/i.test(navigator.userAgent)) // { // document.getElementById("ios").remove() // document.getElementById("desktop").remove() // } if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) { // document.getElementById("android").remove() document.getElementById("desktop").remove() } else { document.getElementById("ios").remove() // document.getElementById("android").remove() }

^^ This works fine on iPhone 7 running iOS 13.0 and iPads running iOS < 13.0. But, for iPad devices running iOS 13 the /iPhone|iPad|iPod/i.test(navigator.userAgent) check removes the "iOS" span rather than the "desktop" one.

This happens when trying to download in Safari.

A work around, for now, is to open the links up in Chrome.

CFBundleDisplayName should be optional

CFBundleDisplayName is not set by default when setting up a new Xcode project so the plugin should use the CFBundleName as fallback because right now it crashes the fastlane process.

/Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-plugin-aws_s3-1.4.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:167:in `escapeHTML': [!] no implicit conversion of nil into String (TypeError)
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-plugin-aws_s3-1.4.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:167:in `upload_ipa'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-plugin-aws_s3-1.4.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:100:in `run'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/runner.rb:257:in `block (2 levels) in execute_action'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/runner.rb:236:in `block in execute_action'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/runner.rb:231:in `chdir'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/runner.rb:231:in `execute_action'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/fast_file.rb:149:in `method_missing'
	from Fastfile:56:in `block (2 levels) in parsing_binding'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/lane.rb:33:in `call'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/lane_manager.rb:59:in `cruise_lane'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/commands_generator.rb:107:in `block (2 levels) in run'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:75:in `run!'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/commands_generator.rb:332:in `run'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/fastlane/lib/fastlane/cli_tools_distributor.rb:108:in `take_off'
	from /Users/travis/.rvm/gems/ruby-2.4.2/gems/fastlane-2.95.0/bin/fastlane:20:in `<top (required)>'
	from /Users/travis/.rvm/gems/ruby-2.4.2/bin/fastlane:23:in `load'
	from /Users/travis/.rvm/gems/ruby-2.4.2/bin/fastlane:23:in `<main>'
	from /Users/travis/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `eval'
	from /Users/travis/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `<main>'

How to upload additional files (per-version)

For example i would like to upload CHANGELOG.md which i will then read with ajax in my html template. The goal is to show the user what changed in this version right before / during download

uploading files is inconsistent when using `path`

Considering I want to upload App.apk and file.zip

If I use path: "test"
=> the apk will be uploaded as testApp.apk while the files will be stored in test/file.zip

If I use path: "test/"
=> the apk will be uploaded as test/App.apk while the files will NOT be uploaded

This is because the path is handled inconsistently for uploading files and apk

HTML generation fails because Date.current is not available

Commit 4c04ef1 introduced a call to Date.current in the HTML ERB templates, which is not available by default. Replacing it with Date.today fixes the problem.

bundler: failed to load command: fastlane (.../vendor/bundle/ruby/2.4.0/bin/fastlane)
NoMethodError: [!] undefined method `current' for Date:Class
  (erb):61:in `render'
  /usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/erb.rb:896:in `eval'
  /usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/erb.rb:896:in `result'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/erb_template_helper.rb:22:in `render'
  .../vendor/bundle/ruby/2.4.0/bundler/gems/fastlane-plugin-s3-e9c406a00a2a/lib/fastlane/plugin/aws_s3/helper/aws_s3_helper.rb:30:in `render'
  .../vendor/bundle/ruby/2.4.0/bundler/gems/fastlane-plugin-s3-e9c406a00a2a/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:177:in `upload_ipa'
  .../vendor/bundle/ruby/2.4.0/bundler/gems/fastlane-plugin-s3-e9c406a00a2a/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:75:in `run'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/runner.rb:252:in `block (2 levels) in execute_action'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/runner.rb:230:in `block in execute_action'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/runner.rb:226:in `chdir'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/runner.rb:226:in `execute_action'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/runner.rb:148:in `trigger_action_by_name'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/fast_file.rb:146:in `method_missing'
  Fastfile:58:in `block in parsing_binding'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/lane.rb:33:in `call'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/lane_manager.rb:52:in `cruise_lane'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/command_line_handler.rb:30:in `handle'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/commands_generator.rb:104:in `block (2 levels) in run'
  .../vendor/bundle/ruby/2.4.0/gems/commander-fastlane-4.4.4/lib/commander/command.rb:178:in `call'
  .../vendor/bundle/ruby/2.4.0/gems/commander-fastlane-4.4.4/lib/commander/command.rb:153:in `run'
  .../vendor/bundle/ruby/2.4.0/gems/commander-fastlane-4.4.4/lib/commander/runner.rb:476:in `run_active_command'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:39:in `run!'
  .../vendor/bundle/ruby/2.4.0/gems/commander-fastlane-4.4.4/lib/commander/delegates.rb:15:in `run!'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/commands_generator.rb:303:in `run'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/fastlane/lib/fastlane/cli_tools_distributor.rb:66:in `take_off'
  .../vendor/bundle/ruby/2.4.0/gems/fastlane-2.38.1/bin/fastlane:20:in `<top (required)>'
  .../vendor/bundle/ruby/2.4.0/bin/fastlane:22:in `load'
  .../vendor/bundle/ruby/2.4.0/bin/fastlane:22:in `<top (required)>'

Unable to Download App

I get an error alert saying:

Unable to Download App
"AppName" could not be downloaded at this time.

after the loading indicator on the app icon reaches 100%.

Realize Release Overview Page

Hi there,

your plugin is wonderfully working. I have one question. Is it possible to have one single overview page where I can see all versions on s3 with its corresponding Changelog.md files and a user can select which one he would like to download?

Build time is always 00:00 AM

After uploading an IPA, the "build on" is as follows:

Built on Sat, 28 Oct 2017 00:00 AM

The date is correct and changes with every build, but the time stays in 00:00 AM every time.
I was looking in your source code, but I can not really follow it.

Is this a know issue or a problem in my configuration? Where is that build time coming from?
Thanks

Upload files only

Is there a way to ignore all default arguments (like ipa, dsym and xcarchive) and just upload files?

  • I know there is another plugin which is suppose to upload files but that one is old and not working.

can't get source param to work

I have a React Native app and I'm trying to use the source param to upload my jsbundle and sourcemap along with my ipa and apk files. e.g.

aws_s3(
      app_directory: "ios",
      bucket: "mybucket.foo.com",
      region: "us-west-2",
      source: "./build/jsbundle/ios"
    )

My ipa, dsym, plist all get uploaded fine, but not the source folder. Is this a bug or am I doing something wrong?

Fastlane 2.144.0 breaks compatibility

The upgrade to the v3 AWS SDK in 2.144.0 isn't compatible with this plugin.

Bundler could not find compatible versions for gem "aws-sdk-core":
  In snapshot (Gemfile.lock):
    aws-sdk-core (= 3.92.0)

  In Gemfile:
    fastlane-plugin-aws_s3 was resolved to 1.6.1, which depends on
      aws-sdk (~> 2.3) was resolved to 2.11.451, which depends on
        aws-sdk-resources (= 2.11.451) was resolved to 2.11.451, which depends on
          aws-sdk-core (= 2.11.451)

    fastlane (~> 2.0) was resolved to 2.144.0, which depends on
      aws-sdk-s3 (~> 1.0) was resolved to 1.61.1, which depends on
        aws-sdk-core (~> 3, >= 3.83.0)

Seems this might be related โ†’ #16143?


I can try to look into this later this week but I have no clue about ruby and the AWS SDK seems to be quite complicated on first look.

Variable order when creating .plist URL

A discussion within #5 brought shows the URL should be built with the bucket name first, followed by the region. The current structure of the .plist URL has the order switched.

Building both ios and android in a single fastlane run results in context clobbering

I have a private helper lane that accepts options, does some shared logic, and then calls out to aws_s3 with something that looks like:

  aws_s3(
    #...
    ipa: options[:ipa],
    apk: options[:apk],
    dsym: options[:dsym],
  )

This gets called multiple times in the course of one fastlane execution, but this causes issues if I'm building both ios and android in one execution, because ipa and apk get defaulted to Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] and Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] when passed in as nil, and I get an error telling me to pass ipa or apk, not both.

The solution for me was to add these lines of code before calling aws_s3

  # prevent fastlane from using stale values as default values
  Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] = nil
  Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = nil

Not sure what to suggest as a fix, but at the very least it seems if I'm explicitly passing in values as nil (rather than omitting them), they shouldn't be replaced with their default values.

Wrong number of arguments with v2.0.0

With the new version 2.0.0, the method upload_file expects 9 arguments but is called with only 7.

In version 1.8.3

def self.upload_file(s3_client, bucket_name, app_directory, file_name, file_data, acl, server_side_encryption)

In version 2.0.0

def self.upload_file(s3_client, bucket_name, app_directory, file_name, file_data, acl, server_side_encryption, download_endpoint, download_endpoint_replacement_regex)

The call site does not change and still pass only 7 arguments:

file_url = self.upload_file(s3_client, s3_bucket, app_directory, file_name, file_data, acl, server_side_encryption)

Here is a callstack

ArgumentError: [!] wrong number of arguments (given 7, expected 9)
  .../fastlane-plugin-aws_s3-2.0.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:559:in `upload_file'
  .../fastlane-plugin-aws_s3-2.0.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:529:in `block in upload_files'
  .../fastlane-plugin-aws_s3-2.0.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:524:in `each'
  .../fastlane-plugin-aws_s3-2.0.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:524:in `upload_files'
  .../fastlane-plugin-aws_s3-2.0.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:103:in `run'
  .../fastlane-2.178.0/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
  .../fastlane-2.178.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
  .../fastlane-2.178.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
  .../fastlane-2.178.0/fastlane/lib/fastlane/runner.rb:229:in `chdir'
  .../fastlane-2.178.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
  .../fastlane-2.178.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
  .../fastlane-2.178.0/fastlane/lib/fastlane/other_action.rb:23:in `method_missing'

Fastlane match 2.195.0 fails to connect to Amazon S3 on new machine

New Regression Checklist

Issue Information

Installed on a fresh macOS 11.6 machine with brew install fastlane

Description

Match can not access certificates stored on S3 buckets. "unable to get local issuer certificate"

Complete output when running fastlane, including the stack trace and command used
/usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/net/protocol.rb:46:in `connect_nonblock': \e[31m[!] SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)\e[0m (Seahorse::Client::NetworkingError)
	from /usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/net/protocol.rb:46:in `ssl_socket_connect'
	from /usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/net/http.rb:1038:in `connect'
	from /usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/net/http.rb:970:in `do_start'
	from /usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/net/http.rb:965:in `start'
	from /usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/delegate.rb:87:in `method_missing'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/seahorse/client/net_http/connection_pool.rb:300:in `start_session'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/seahorse/client/net_http/connection_pool.rb:99:in `session_for'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/seahorse/client/net_http/handler.rb:124:in `session'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/seahorse/client/net_http/handler.rb:76:in `transmit'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/seahorse/client/net_http/handler.rb:50:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/seahorse/client/plugins/content_length.rb:17:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/seahorse/client/plugins/request_callback.rb:85:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/plugins/s3_signer.rb:130:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/plugins/s3_signer.rb:61:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/plugins/s3_host_id.rb:17:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/xml/error_handler.rb:10:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/transfer_encoding.rb:26:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/helpful_socket_errors.rb:12:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/plugins/s3_signer.rb:108:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/plugins/redirects.rb:20:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/retry_errors.rb:349:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/retry_errors.rb:383:in `retry_request'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/retry_errors.rb:371:in `retry_if_possible'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/retry_errors.rb:360:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/retry_errors.rb:383:in `retry_request'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/retry_errors.rb:371:in `retry_if_possible'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/retry_errors.rb:360:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/retry_errors.rb:383:in `retry_request'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/retry_errors.rb:371:in `retry_if_possible'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/retry_errors.rb:360:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/http_checksum.rb:18:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/endpoint_pattern.rb:30:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/plugins/dualstack.rb:46:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/plugins/accelerate.rb:61:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/plugins/expect_100_continue.rb:22:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb:26:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/plugins/bucket_dns.rb:35:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/plugins/arn.rb:62:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/rest/handler.rb:10:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/user_agent.rb:13:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/endpoint_discovery.rb:80:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/seahorse/client/plugins/endpoint.rb:47:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/param_validator.rb:26:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/plugins/arn.rb:95:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/plugins/sse_cpk.rb:24:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/plugins/dualstack.rb:36:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/plugins/accelerate.rb:50:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:22:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/idempotency_token.rb:19:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/param_converter.rb:26:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/seahorse/client/plugins/request_callback.rb:71:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/plugins/response_paging.rb:12:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/seahorse/client/plugins/response_target.rb:24:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/seahorse/client/request.rb:72:in `send_request'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/waiters/poller.rb:65:in `send_request'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/waiters/poller.rb:51:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/waiters/waiter.rb:107:in `block in poll'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/waiters/waiter.rb:104:in `loop'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/waiters/waiter.rb:104:in `poll'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/waiters/waiter.rb:94:in `block (2 levels) in wait'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/waiters/waiter.rb:93:in `catch'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/waiters/waiter.rb:93:in `block in wait'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/waiters/waiter.rb:92:in `catch'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-core-3.121.1/lib/aws-sdk-core/waiters/waiter.rb:92:in `wait'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/waiters.rb:123:in `wait'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/bucket.rb:98:in `wait_until_exists'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/aws-sdk-s3-1.103.0/lib/aws-sdk-s3/bucket.rb:79:in `exists?'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/fastlane-2.195.0/fastlane/lib/fastlane/helper/s3_client_helper.rb:50:in `find_bucket!'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/fastlane-2.195.0/match/lib/match/storage/s3_storage.rb:104:in `download'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/fastlane-2.195.0/match/lib/match/runner.rb:63:in `run'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/fastlane-2.195.0/match/lib/match/commands_generator.rb:69:in `block (3 levels) in run'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/fastlane-2.195.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:117:in `run!'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/fastlane-2.195.0/match/lib/match/commands_generator.rb:188:in `run'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/fastlane-2.195.0/match/lib/match/commands_generator.rb:26:in `start'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/fastlane-2.195.0/fastlane/lib/fastlane/cli_tools_distributor.rb:114:in `take_off'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/gems/fastlane-2.195.0/bin/fastlane:23:in `'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/bin/fastlane:23:in `load'
	from /usr/local/Cellar/fastlane/2.195.0/libexec/bin/fastlane:23:in `'

Environment

[โœ”] ๐Ÿš€ 
[08:40:44]: fastlane detected a Gemfile in the current directory
[08:40:44]: However, it seems like you didn't use `bundle exec`
[08:40:44]: To launch fastlane faster, please use
[08:40:44]: 
[08:40:44]: $ bundle exec fastlane env
[08:40:44]: 
[08:40:44]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[08:40:45]: Generating fastlane environment output, this might take a few seconds...
swift-driver version: 1.26.9 
โœ… fastlane environment โœ…

Stack

Key Value
OS 11.6
Ruby 3.0.2
Bundler? false
Git git version 2.30.1 (Apple Git-130)
Installation Source /usr/local/Cellar/fastlane/2.195.0/libexec/bin/fastlane
Host macOS 11.6 (20G165)
Ruby Lib Dir /usr/local/Cellar/ruby/3.0.2/lib
OpenSSL Version OpenSSL 1.1.1k 25 Mar 2021
Is contained false
Is homebrew true
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 13.0
Swift Version 5.5

System Locale

Variable Value
LANG en_US.UTF-8 โœ…
LC_ALL en_US.UTF-8 โœ…
LANGUAGE

fastlane files:

`./fastlane/Fastfile`
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:ios)

# before_all do
#   create_keychain(
#     name: "macos_build",
#     default_keychain: true,
#     unlock: true,
#     timeout: 0,
#     lock_when_sleeps: false,
#     password: "Passw0rd!"
#   )
# end

platform :ios do
  
  lane :clean do 
    clean_build_artifacts
    clear_derived_data
  end

  lane :beta do
    desc "Push a new beta build to TestFlight"
    # match(type: "appstore", readonly: true)
    increment_build_number(xcodeproj: "getting started.xcodeproj")
    build_app(workspace: "getting started.xcworkspace", scheme: "getting started")
    upload_to_testflight
  end
  

  lane :build do
#    unlock_keychain( 
#        path: "/Users/ec2-user/Library/Keychains/dev.keychain-db",
#        password: "Passw0rd",
#        set_default: true
#    )
    desc "Build the project"
    match(type: "development", readonly: true)
    build_app(workspace: "getting started.xcworkspace", scheme: "getting started",
              skip_archive: false,
              export_method: "development")
  end

end
`./fastlane/Appfile`
app_identifier("com.amazonaws.amplify.mobile.getting-started") # The bundle identifier of your app

apple_id(ENV['APPLE_ID']) # Your Apple email address
itc_team_id(ENV['ITC_TEAM_ID']) # App Store Connect Team ID
team_id(ENV['TEAM_ID']) # Developer Portal Team ID

# For more information about the Appfile, see:
#     https://docs.fastlane.tools/advanced/#appfile

fastlane gems

Gem Version Update-Status
fastlane 2.195.0 โœ… Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.5.0
atomos 0.1.3
rexml 3.2.5
CFPropertyList 3.0.4
claide 1.0.3
colored2 3.1.2
nanaimo 0.3.0
xcodeproj 1.21.0
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
unicode-display_width 1.8.0
terminal-table 1.8.0
plist 3.6.0
public_suffix 4.0.6
addressable 2.8.0
multipart-post 2.0.0
word_wrap 1.0.0
optparse 0.1.1
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
artifactory 3.0.15
babosa 1.0.4
colored 1.2
highline 2.0.3
commander 4.6.0
excon 0.85.0
faraday-em_http 1.0.0
faraday-em_synchrony 1.0.0
faraday-excon 1.1.0
faraday-httpclient 1.0.1
faraday-net_http 1.0.1
faraday-net_http_persistent 1.2.0
faraday-patron 1.0.0
faraday-rack 1.0.0
ruby2_keywords 0.0.5
faraday 1.8.0
unf_ext 0.0.8
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.4
faraday-cookie_jar 0.0.7
faraday_middleware 1.1.0
fastimage 2.2.5
gh_inspector 1.1.3
json 2.5.1
mini_magick 4.11.0
naturally 2.2.1
rubyzip 2.3.2
security 0.1.3
xcpretty-travis-formatter 1.0.1
dotenv 2.7.6
bundler 2.2.22
simctl 1.6.8
jwt 2.2.3
uber 0.1.0
declarative 0.0.20
trailblazer-option 0.1.1
representable 3.1.1
retriable 3.1.2
mini_mime 1.1.1
memoist 0.16.2
multi_json 1.15.0
os 1.1.1
signet 0.16.0
googleauth 0.17.1
httpclient 2.8.3
webrick 1.7.0
google-apis-core 0.4.1
google-apis-playcustomapp_v1 0.5.0
google-apis-androidpublisher_v3 0.11.0
google-cloud-env 1.5.0
google-cloud-errors 1.2.0
google-cloud-core 1.6.0
google-apis-iamcredentials_v1 0.7.0
google-apis-storage_v1 0.7.0
rake 13.0.6
digest-crc 0.6.4
google-cloud-storage 1.34.1
emoji_regex 3.2.2
jmespath 1.4.0
aws-partitions 1.506.0
aws-eventstream 1.2.0
aws-sigv4 1.4.0
aws-sdk-core 3.121.1
aws-sdk-kms 1.48.0
aws-sdk-s3 1.103.0
tsort 0.1.0
uri 0.10.1
set 1.0.1
forwardable 1.3.2
logger 1.4.3
pathname 0.1.0
shellwords 0.1.0
cgi 0.2.0
date 3.1.0
timeout 0.1.1
stringio 3.0.0
openssl 2.2.0
io-nonblock 0.1.0
ipaddr 1.2.2
io-wait 0.1.0
zlib 1.1.0
resolv 0.2.0
securerandom 0.1.0
digest 3.0.0
time 0.1.0
open-uri 0.1.0
mutex_m 0.1.1
net-protocol 0.1.0
ostruct 0.3.1
english 0.7.1
erb 2.2.0
strscan 3.0.0
abbrev 0.1.0
io-console 0.5.7
tempfile 0.1.1
delegate 0.2.0
fileutils 1.5.0
tmpdir 0.1.2
base64 0.1.0
singleton 0.1.1
net-http 0.1.1
open3 0.1.1
nkf 0.1.0
prettyprint 0.1.0
pp 0.1.0
find 0.1.0
yaml 0.1.1
psych 3.3.0

generated on: 2021-09-27

[08:40:49]: Take notice that this output may contain sensitive information, or simply information that you don't want to make public. [08:40:49]: ๐Ÿ™„ Wow, that's a lot of markdown text... should fastlane put it into your clipboard, so you can easily paste it on GitHub? (y/n) y [08:40:50]: Successfully copied markdown into your clipboard ๐ŸŽจ [08:40:50]: Open https://github.com/fastlane/fastlane/issues/new to submit a new issue โœ…

Sh action adding a backslash to redirect '>' character

I have a sh action like this in my fastfile:

sh("echo", someString, ">", "Output.txt")

This action is intended to take a string and put it in Output.txt, which is used by other processes.

However The output in terminal from running the lane shows a backslash is getting added to the command:

 -------------------------------------
[13:59:49]: --- Step: echo someString \> Output.txt ---
[13:59:49]: -------------------------------------
[13:59:49]: $ echo someString \> Output.txt
[13:59:49]: โ–ธ someString > Output.txt

The backslash is getting put into the echo command escaped and is not being used to redirect the Output.txt file, so the out

I feel like I'm missing something obvious, any help is appreciated, I've tried digging into the gem that generates the bash command but I couldn't track down the culprit

need plist_file_name option back

Compare to plugin s3, aws_s3 eliminate plist_file_name option. Without settings plist_file_name, It will makes download link break.

Would like to see it included in a release soon.

ipa_url

I want to be able to print ipa_url to file outside the aws_s3 plugin, I see that the env variable has been passed to ipa_url.. How can I print to screen?

Trouble with region parameter

I am having trouble with the region parameter after the action finishes.

It seems that adding that to the URL for my region causes a cert mismatch (or something) and breaks the download to the device. I can't leave it empty as its a required parameter.

If I trim the region from the URL then everything works as expected. FWIW I am in region us-east-1. Here is the message the browser shows.

screen shot 2017-01-23 at 6 36 43 pm

upload framework support

Hi,

Currently it seems that either an IPA or an APK is required as a parameter. I would like to propose upload of compiled frameworks.

Use case:
We are using S3 to host compiled frameworks that are delivered via cocoapods.

I would be happy to collaborate but would like to know opinions.
Anurag

APK can't open file

After uploading my APK to S3 and downloading it from an Android device, I can't open my apk file and install the app. Here's my Fastfile lane:

lane :test do |options|
    gradle(
      task: 'assemble',
      build_type: 'Release',
    )
    aws_s3(
      access_key: ENV['HERO_S3_ACCESS_KEY_STAGING'],
      secret_access_key: ENV['HERO_S3_SECRET_ACCESS_KEY_STAGING'],
      bucket: ENV['HERO_S3_BUCKET_STAGING'],
      region: ENV['HERO_S3_REGION_STAGING'],
      apk: 'app/build/outputs/apk/app-release.apk',
      app_directory: 'test/android',
      upload_metadata: true,
      version_file_name: 'version_android.json',    
    )
end

Thanks for the great plugin!

Unknown method 'version_file_names'

Error throws - upload of artifact and html successful, but fails the rest of the process because of the version file.

[18:56:50]: Cruising over to lane 'android upload' ๐Ÿš–
[18:56:50]: --------------------
[18:56:50]: --- Step: aws_s3 ---
[18:56:50]: --------------------
[18:56:53]: Unknown method 'version_file_names'

Using like this:

lane :upload do
  aws_s3(
    access_key: ENV["S3_ACCESS_KEY"],
    secret_access_key: ENV["S3_SECRET_ACCESS_KEY"],
    bucket: "mobile-apps",
    region: "us-west-2",
    app_directory: "asdf",
    upload_metadata: true,
  )
end

May be related to the 2.0.0 upgrade. https://github.com/fastlane-community/fastlane-plugin-s3/pull/51/files

EDIT: adding upload_metadata: false, seems to be a temporary workaround as it returns in that function early, but I'd like to use the version.json and html.

Attached is the fastlane env:

โœ… fastlane environment โœ…

Stack

Key Value
OS 10.15.7
Ruby 2.7.2
Bundler? true
Git git version 2.30.1
Installation Source /usr/local/lib/ruby/gems/2.7.0/bin/fastlane
Host Mac OS X 10.15.7 (19H524)
Ruby Lib Dir /usr/local/Cellar/[email protected]/2.7.2/lib
OpenSSL Version OpenSSL 1.1.1i 8 Dec 2020
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 12.4

System Locale

Variable Value
LANG en_US.UTF-8 โœ…
LC_ALL
LANGUAGE

fastlane files:

`./fastlane/Fastfile`
package = load_json(json_path: "package.json")
version = package["version"]
build = ENV.has_key?("GITHUB_RUN_NUMBER") ? ENV["GITHUB_RUN_NUMBER"] : 1

lane :upload do
  aws_s3(
    access_key: ENV["S3_ACCESS_KEY"],
    secret_access_key: ENV["S3_SECRET_ACCESS_KEY"],
    bucket: "mobile-apps",
    region: "us-west-2",
    app_directory: "asdf",
    upload_metadata: true,
  )
end

platform :android do
  desc "Build Android app"
  lane :build do
    skip_docs
    gradle(
      task: "clean assembleRelease",
      project_dir: "android",
      system_properties: {
        "BASE_NAME" => "v#{version}-#{build}",
        "VERSION_CODE" => build,
        "VERSION_NAME" => version,
      },
    )
    on_success("Android")
    if ENV["S3_ACCESS_KEY"] && ENV["S3_SECRET_ACCESS_KEY"]
      upload
    end
  end
  error do |lane, exception|
    on_error("Android", lane, exception)
  end
end

platform :ios do
  desc "Build iOS app"
  lane :build do
    skip_docs
    clean_build_artifacts
    clear_derived_data
    if is_ci
      create_keychain(
        name: "fastlane-asdf",
        unlock: false,
        timeout: false,
      )
      match(
        type: "enterprise",
        git_url: "https://github.com/asdf/ios-codesigning",
        git_branch: "latest",
        git_basic_authorization: Base64.strict_encode64(ENV["FASTLANE_CODESIGNING_REPO_TOKEN"]),
        readonly: true,
        keychain_name: "fastlane-asdf",
      )
    else
      match(
        type: "enterprise",
        git_url: "https://github.com/asdf/ios-codesigning",
        git_branch: "latest",
        readonly: true,
        verbose: true,
      )
    end
    increment_version_number(
      version_number: version,
      xcodeproj: "ios/asdf.xcodeproj",
    )
    increment_build_number(
      build_number: build,
      skip_info_plist: true,
      xcodeproj: "ios/asdf.xcodeproj",
    )
    update_project_provisioning(
      target_filter: "asdf",
      profile: ENV["sigh_com.asdf.asdf_enterprise_profile-path"],
      build_configuration: "Release",
      xcodeproj: "ios/asdf.xcodeproj",
    )
    build_app(
      clean: true,
      silent: true,
      export_method: "enterprise",
      export_options: {
        provisioningProfiles: {
          "com.asdf.asdf" => ENV["sigh_com.asdf.asdf_enterprise_profile-name"],
        },
      },
      output_name: "v#{version}-#{build}.ipa",
      scheme: "asdf",
      workspace: "ios/asdf.xcworkspace",
    )
    on_success("iOS")
    if is_ci && ENV["S3_ACCESS_KEY"] && ENV["S3_SECRET_ACCESS_KEY"]
      upload
    end
  end
  error do |lane, exception|
    on_error("iOS", lane, exception)
  end
end

def on_success(platform)
  slack(
    message: "asdf- #{platform} Build Successful",
    default_payloads: [:git_branch, :git_author, :last_git_commit, :last_git_commit_hash],
    attachment_properties: {
      fields: [{
        title: "Details",
        value: "https://github.com/#{ENV["GITHUB_REPOSITORY"]}/actions/runs/#{ENV["GITHUB_RUN_ID"]}",
      }],
    },
  )
end

def on_error(platform, lane, exception)
  slack(
    message: "asdf - #{platform} Build Failed",
    success: false,
    default_payloads: [:git_branch, :git_author, :last_git_commit, :last_git_commit_hash],
    attachment_properties: {
      fields: [{
        title: "Details",
        value: "https://github.com/#{ENV["GITHUB_REPOSITORY"]}/actions/runs/#{ENV["GITHUB_RUN_ID"]}",
      }],
    },
  )
end
`./fastlane/Appfile`
app_identifier("com.asdf.asdf")
itc_team_id("12312312")
package_name("com.asdf.asdf")
team_id("123123112313")

fastlane gems

Gem Version Update-Status
fastlane 2.178.0 โœ… Up-To-Date

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-aws_s3 2.0.0 โœ… Up-To-Date
fastlane-plugin-load_json 0.0.1 โœ… Up-To-Date
Loaded gems
Gem Version
did_you_mean 1.4.0
bundler 2.1.4
uri 0.10.0
rake 13.0.3
CFPropertyList 3.0.3
public_suffix 4.0.6
addressable 2.7.0
rubyzip 2.3.0
apktools 0.7.4
artifactory 3.0.15
atomos 0.1.3
aws-eventstream 1.1.1
aws-partitions 1.434.0
aws-sigv4 1.2.3
jmespath 1.4.0
aws-sdk-core 3.113.0
aws-sdk-kms 1.43.0
aws-sdk-s3 1.93.0
babosa 1.0.4
claide 1.0.3
colored 1.2
colored2 3.1.2
highline 1.7.10
commander-fastlane 4.4.6
declarative 0.0.20
declarative-option 0.1.0
digest-crc 0.6.3
unf_ext 0.0.7.7
unf 0.1.4
domain_name 0.5.20190701
dotenv 2.7.6
emoji_regex 3.2.2
excon 0.79.0
faraday-net_http 1.0.1
multipart-post 2.0.0
ruby2_keywords 0.0.4
faraday 1.3.0
http-cookie 1.0.3
faraday-cookie_jar 0.0.7
faraday_middleware 1.0.0
fastimage 2.2.3
gh_inspector 1.1.3
jwt 2.2.2
memoist 0.16.2
multi_json 1.15.0
os 1.1.1
signet 0.15.0
googleauth 0.16.0
httpclient 2.8.3
mini_mime 1.0.2
uber 0.1.0
representable 3.0.4
retriable 3.1.2
google-api-client 0.38.0
rexml 3.2.4
webrick 1.7.0
google-apis-core 0.3.0
google-apis-iamcredentials_v1 0.2.0
google-apis-storage_v1 0.3.0
google-cloud-env 1.5.0
google-cloud-errors 1.1.0
google-cloud-core 1.6.0
google-cloud-storage 1.31.0
json 2.5.1
mini_magick 4.11.0
naturally 2.2.1
plist 3.6.0
security 0.1.3
simctl 1.6.8
slack-notifier 2.3.2
terminal-notifier 2.0.0
unicode-display_width 1.7.0
terminal-table 1.8.0
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
word_wrap 1.0.0
nanaimo 0.3.0
xcodeproj 1.19.0
rouge 2.0.7
xcpretty 0.3.0
xcpretty-travis-formatter 1.0.1
mime-types-data 3.2021.0225
mime-types 3.3.1
fastlane-plugin-aws_s3 2.0.0
fastlane-plugin-load_json 0.0.1

generated on: 2021-03-25

Value of S3_FOLDER_OUTPUT_PATH is sometimes wrong due to url encoding

I want to upload a folder in which I have several files named with the following form:

iOSProject.xcresult/0~pvlGU5pGizhBI1k74zczqoDoy_lNvIDREFIIhVLL-uXcjIVzXCFwyPnCUgpDCUsFUx5flqAdc06TPZknz7A7iA==

Note the == at the end of the file name.

When using the aws_s3(folder: "iOSProject.xcresult") the file is uploaded correctly to my bucket, and the final url has the following form, which is correct:

https://user.s3.eu-central-1.amazonaws.com/report/iOSProject.xcresult.xcresult/0~pvlGU5pGizhBI1k74zczqoDoy_lNvIDREFIIhVLL-uXcjIVzXCFwyPnCUgpDCUsFUx5flqAdc06TPZknz7A7iA%3D%3D

We can note that the last path component is 0~pvlGU5pGizhBI1k74zczqoDoy_lNvIDREFIIhVLL-uXcjIVzXCFwyPnCUgpDCUsFUx5flqAdc06TPZknz7A7iA%3D%3D with %3D%3D instead of == at the end.

The issue is that the S3_FOLDER_OUTPUT_PATH values contains the full path with the file in it: https://user.s3.eu-central-1.amazonaws.com/report/iOSProject.xcresult.xcresult/0~pvlGU5pGizhBI1k74zczqoDoy_lNvIDREFIIhVLL-uXcjIVzXCFwyPnCUgpDCUsFUx5flqAdc06TPZknz7A7iA%3D%3D instead of https://user.s3.eu-central-1.amazonaws.com/report/

The bug lies here:

Actions.lane_context[SharedValues::S3_FOLDER_OUTPUT_PATH] = file_url.gsub('/' + file_relative_path_to_folder, '')

Indeed we try to do a basic gsub from the url, but in our case there is no match because of the == that is encoded.

Feature request: Pre-signed URLs

Lots of our app distribution is for internal-only Enterprise-licensed builds.

For S3 buckets that we do not wish to make publicly readable, it would be great to generate the URLs within the .plist/.html using pre-signed URLs. You could supply a parameter for the expiration time of the URLs, or default it to 1 year.

(Sorry, if I knew a lick of Ruby I'd generate a PR myself. :) )

Roles are not supported

The way the client is being instantiated, the role_arn is being ignored from the config/credentials file. According to a comment in issue 1256 of the aws-ruby-sdk, it appears the recommended way of instantiating a client is to pass the options in as a hash and let the SDK work out the security configuration.

For example:

  client_cfg = {}
  client_cfg[:region] = s3_region if s3_region
  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) if s3_access_key && s3_secret_access_key

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

Here is a sample ~/.aws/credential

aws_access_key_id=XXXXXXXXXXXXXXX
aws_secret_access_key=XXXXXXXXXXXXXXXXXXXXX

[pitdevops]
role_arn=arn:aws:iam::000000000000:role/RoleName
source_profile=default

I will create a PR

wrong number of arguments (given 1, expected 2) with fastlane-2.82.0

After upgrading the fastlane version (2.82.0), i've this error :

/var/lib/gems/2.3.0/gems/fastlane-2.82.0/fastlane/lib/fastlane/erb_template_helper.rb:21:in` `initialize': [!] wrong number of arguments (given 1, expected 2) (ArgumentError)
	from /var/lib/gems/2.3.0/gems/fastlane-plugin-aws_s3-1.1.1/lib/fastlane/plugin/aws_s3/helper/aws_s3_helper.rb:29:in `new'
	from /var/lib/gems/2.3.0/gems/fastlane-plugin-aws_s3-1.1.1/lib/fastlane/plugin/aws_s3/helper/aws_s3_helper.rb:29:in `render'
	from /var/lib/gems/2.3.0/gems/fastlane-plugin-aws_s3-1.1.1/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:299:in `upload_apk'

Fastlane::ErbalT.new(template_vars_hash).render(template)

fastlane/erb_template_helper.rb

def self.render(template, template_vars_hash, trim_mode = nil)
      Fastlane::ErbalT.new(template_vars_hash, trim_mode).render(template)
end

You must add a "trim_mode".
I fixed it with a nil value.

Many thanks !

Move HTML page into version directories

The HTML page is generated outside of the directories containing the uploaded versions. Since we would like to have an easy way to install older builds it would be great if there's a way to move the generated HTML files into those directories.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.