{"action":"created","issue":{"url":"https://api.github.com/repos/fastlane/fastlane/issues/7505","repository_url":"https://api.github.com/repos/fastlane/fastlane","labels_url":"https://api.github.com/repos/fastlane/fastlane/issues/7505/labels{/name}","comments_url":"https://api.github.com/repos/fastlane/fastlane/issues/7505/comments","events_url":"https://api.github.com/repos/fastlane/fastlane/issues/7505/events","html_url":"https://github.com/fastlane/fastlane/issues/7505","id":195813788,"number":7505,"title":"[gym] Export of archive takes a LOT of time.","user":{"login":"palusik86","id":5813496,"avatar_url":"https://avatars.githubusercontent.com/u/5813496?v=3","gravatar_id":"","url":"https://api.github.com/users/palusik86","html_url":"https://github.com/palusik86","followers_url":"https://api.github.com/users/palusik86/followers","following_url":"https://api.github.com/users/palusik86/following{/other_user}","gists_url":"https://api.github.com/users/palusik86/gists{/gist_id}","starred_url":"https://api.github.com/users/palusik86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palusik86/subscriptions","organizations_url":"https://api.github.com/users/palusik86/orgs","repos_url":"https://api.github.com/users/palusik86/repos","events_url":"https://api.github.com/users/palusik86/events{/privacy}","received_events_url":"https://api.github.com/users/palusik86/received_events","type":"User","site_admin":false},"labels":[{"id":351212709,"url":"https://api.github.com/repos/fastlane/fastlane/labels/action","name":"action","color":"d93f0b","default":false},{"id":315718126,"url":"https://api.github.com/repos/fastlane/fastlane/labels/gym","name":"gym","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-12-15T14:06:03Z","updated_at":"2016-12-21T19:07:02Z","closed_at":null,"body":"### Issue Description\r\n\r\nUsing `gym` and export method `ad-hoc` or `app-store` takes on our project 30 minutes or more on Jenkins., but manual archive of the same project, same settings but using xCode archive takes 1/4 of the time - using MacBook Pro late 2015 with i7.\r\n\r\nAs you will se below, export action took 26 minutes.\r\n\r\n### Environment\r\n\r\nSpec of Jenkins machine:\r\nMac Pro late 2013, Xeon E5 5 cores, 16 GB RAM, 512 SSD\r\nMacOS: 10.12.1\r\nJenkins Version: 2.36\r\nXcode 8.1\r\n\r\n<details><summary>✅ fastlane environment ✅</summary>\r\n\r\n### Stack\r\n\r\n| Key                 | Value                                       |\r\n| ------------------- | ------------------------------------------- |\r\n| OS                  | 10.12.1                                     |\r\n| Ruby                | 2.3.1                                       |\r\n| Bundler?            | false                                       |\r\n| Git                 | git version 2.9.3 (Apple Git-75)            |\r\n| Installation Source | ~/.rvm/gems/ruby-2.3.1/bin/fastlane         |\r\n| Host                | Mac OS X 10.12.1 (16B2555)                  |\r\n| Ruby Lib Dir        | ~/.rvm/rubies/ruby-2.3.1/lib                |\r\n| OpenSSL Version     | OpenSSL 1.0.2g  1 Mar 2016                  |\r\n| Is contained        | false                                       |\r\n| Xcode Path          | /Applications/Xcode.app/Contents/Developer/ |\r\n| Xcode Version       | 8.1                                         |\r\n\r\n\r\n### System Locale\r\n\r\n| Variable | Value       |   |\r\n| -------- | ----------- | - |\r\n| LANG     | en_US.UTF-8 | ✅ |\r\n| LC_ALL   | en_US.UTF-8 | ✅ |\r\n| LANGUAGE | en_US.UTF-8 | ✅ |\r\n\r\n\r\n### fastlane files:\r\n\r\n<details><summary>`./fastlane/Fastfile`</summary>\r\n\r\n```ruby\r\n#\r\n# Project spec. Necessary things go here\r\n#\r\n\r\n\tdefault_device = \"iPhone 6s\"\r\n\r\n\tdevices_tests_ab = [\r\n\t\t\"iPad Pro (12.9 inch)\",\r\n\t\t\"iPad Pro (9.7 inch)\",\r\n\t\t\"iPad Air\",\r\n\t\t\"iPhone 6s Plus\",\r\n\t\t\"iPhone 6s\",\r\n\t\t\"iPhone 5s\"\r\n\t]\r\n\r\n\tschemes_tests_ab = [ \r\n\t]\r\n\r\n\tschemes_tests = [\r\n\t\t\"DataTypes\",\r\n\t\t\"GUI\",\r\n\t\t\"SportFeedsIO\",\r\n\t\t\"Store\",\r\n\t\t\"AppStore\",\r\n\t\t\"UIReusable\",\r\n\t\t\"UIDataSources\",\r\n\t\t\"App\"\r\n\t]\r\n\r\n\tproject_path_name = \"App/App.xcodeproj\"\r\n\tworkspace_name = \"Main.xcworkspace\"\r\n\tscheme_release = \"App\"\r\n\tcrashlytics_local_path = \"App/Vendors/Crashlytics.framework/\"\r\n\tsonar_name = \"iOS-App\"\r\n\tdefault_config = \"Release\"\r\n\r\n\t#Signing details, please fill it always!\r\n\tprovisioning_adhoc = \"PROVISIONING_PROFILE_SPECIFIER=\\\"App Ad Hoc\\\"\"\r\n\tprovisioning_release = \"PROVISIONING_PROFILE_SPECIFIER=\\\"App App Store\\\"\"\r\n\r\n\r\n#\r\n# the end of needed things\r\n#\r\n\r\nplatform :ios do\r\n\tdesc \"Before all do this:\"\r\n\tbefore_all do\r\n\t   \tunlock_keychain(path: \"login.keychain-db\",\r\n\t   \t\t\t\t\tpassword: \"password\")\r\n \tend\r\n\r\n\tdesc \"Upload on iTunes\"\r\n\tlane :deploy do \r\n\t\tname = scheme_release\r\n\t\tprovisioning_profile = provisioning_release\r\n\r\n\t\tproject_path = project_path_name\r\n\t\tbuild_number = number_of_commits\r\n\r\n\t\tincrement_build_number(\r\n\t\t\tbuild_number: build_number,\r\n\t\t\txcodeproj: project_path)\r\n\t\t\r\n\t\tbuild(export: \"app-store\",\r\n\t\t\t  provisioning: provisioning_profile)\r\n\t\t\r\n\t\tdeliver(ipa: \"#{name}.ipa\",\r\n\t\t\t\tsubmit_for_review: false,\r\n\t\t\t\tskip_metadata: true,\r\n\t\t\t\tautomatic_release: false,\r\n\t\t\t\tforce: true)\r\n\tend\r\n\r\n\tdesc \"Run unit tests\"\r\n\tlane :test do\r\n\t\tschemes = schemes_tests\r\n\t\tschemes.each do |scheme|\r\n\t\t\ttest_generic(\r\n\t\t\t\tscheme:scheme,\r\n\t\t\t\tdevices: [default_device])\r\n\t\tend\r\n\tend\r\n\r\n\tdesc \"Install all dependencies\"\r\n\tlane :make do\r\n\t\tcarthage(\r\n\t\t\tcommand: \"bootstrap\",\r\n\t\t\tplatform: \"iOS\",\r\n\t\t\tuse_binaries: true)\r\n\tend\r\n\r\n\tdesc \"Run build for fabric\"\r\n\tlane :fabric do\r\n\r\n\t\tbuild_number = number_of_commits\r\n\t\tproject_path = project_path_name\r\n\t\tworkspace = workspace_name\r\n\t\tscheme = scheme_release\r\n\t\tcrashlytics_path = crashlytics_local_path\r\n\t\tprovisioning_profile = provisioning_adhoc\r\n\t\t\r\n\t\tversion_number = get_version_number(xcodeproj: project_path)\r\n\t\tgit_tag = \"CI/v#{version_number}/##{build_number}\"\r\n\r\n\t\tm_build_number = \"Build number: #{build_number}\"\r\n\t\tm_build_branch = \"Branch: #{git_branch}\"\r\n\t\tm_build_commit = \"Commit: #{last_git_commit[:abbreviated_commit_hash]}\"\r\n\t\tm_groups = ENV[\"CRASHLYTICS_GROUPS\"]\r\n\t\tm_comments = ENV[\"CRASHLYTICS_NOTES\"]\r\n\t\t\r\n\t\tmessage = [\r\n\t\t\tm_build_number,\r\n\t\t\tm_build_branch,\r\n\t\t\tm_build_commit,\r\n\t\t\t\"GIT TAG: #{git_tag}\",\r\n\t\t\t\"Groups: #{m_groups}\",\r\n\t\t\t\"Release Notes: #{m_comments}\"\r\n\t\t]\r\n\t\t.join(\"\\n\")\r\n\r\n\t\tincrement_build_number(\r\n\t\t\tbuild_number: build_number,\r\n\t\t\txcodeproj: project_path)\r\n\r\n\t\tbuild(export: \"ad-hoc\", \r\n\t\t\t  provisioning: provisioning_profile)\r\n\r\n\t\tcrashlytics(\r\n\t\t\tcrashlytics_path: \"#{crashlytics_path}\",\r\n\t\t\tapi_token: \"xxxxx\",\r\n\t\t\tbuild_secret: \"xxxxxx\",\r\n\t\t\tnotes: \"#{message}\",\r\n\t\t\tgroups: m_groups)\r\n\r\n\t\tif !git_tag_exists(tag: git_tag)\r\n\t\t\tadd_git_tag(tag: git_tag)\r\n\t\t\tpush_git_tags\r\n\t\tend\r\n\r\n\t\tslackNotifier(message: message)\r\n\tend\r\n\r\n\tdesc \"Run metrics for all project modules\"\r\n\tlane :metrics do\r\n\t\tschemes = schemes_tests\r\n\t\tschemes.each do |scheme|\r\n\t\t\tmetrics_generic(\r\n\t\t\t\tscheme: scheme,\r\n\t\t\t\tdevices: default_device)\r\n\t\tend\r\n\tend\r\n\r\n\tdesc \"Run all AB Tests\"\r\n\tprivate_lane :test_ab do\r\n\t\tdevices = devices_tests_ab\r\n\t\tschemes = schemes_tests_ab\r\n\r\n\t\tschemes.each do |scheme|\r\n\t\t\ttest_generic(\r\n\t\t\t\tscheme:scheme,\r\n\t\t\t\tdevices:devices)\r\n\t\tend\r\n\tend\r\n\r\n\tdesc \"Build project\"\r\n\tprivate_lane :build do |options|\r\n\t\tcleanAll\r\n\r\n\t\texport = options[:export]\r\n\t\tprovisioning = options[:provisioning]\r\n\t\tworkspace = workspace_name\r\n\t\tscheme = scheme_release\r\n\t\tconfig = default_config\r\n\r\n\t\tgym(workspace: workspace,\r\n\t\t\tscheme: scheme,\r\n\t\t\tconfiguration: config,\r\n\t\t\tinclude_bitcode: false,\r\n\t\t\texport_method: export,\r\n\t\t\tclean: true,\r\n\t\t\toutput_name: \"#{scheme}.ipa\")\r\n\tend\r\n\r\n\tdesc \"Run metrics for selected scheme in project\"\r\n\tprivate_lane :metrics_generic do |options|\r\n\r\n\t\tscheme = options[:scheme]\r\n\t\tdevices = options[:devices]\r\n\t\tproject_path = project_path_name\r\n\t\tworkspace = workspace_name\r\n\t\tcrashlytics_path = crashlytics_local_path\r\n\t\tproject_name = sonar_name\r\n\r\n\t\ttest_generic(\r\n\t\t\tscheme:scheme,\r\n\t\t\tdevices:devices)\r\n\r\n\t\tslather(\r\n\t\t\tworkspace: \"#{workspace}\",\r\n\t\t\tscheme: \"#{scheme}\",\r\n\t\t\tproj: \"#{scheme}/#{scheme}.xcodeproj\",\r\n\t\t\tcobertura_xml: true,\r\n\t\t\tjenkins: true,\r\n\t\t\tbuild_directory: \"./build/#{scheme}.DerivedData\",\r\n\t\t\toutput_directory: \"./build/#{scheme}.reports/\")\r\n\t\tsh(\"cd .. && lizard ./#{scheme}/ -l swift --xml > ./build/#{scheme}.reports/lizard-report.xml\")\r\n\r\n\t\tswiftlint(output_file: \"./build/#{scheme}.reports/swiftlint.txt\", ignore_exit_status: true)\r\n\r\n\t\tsonar_parameters = [\r\n\t\t\t\"sonar.projectKey=#{project_name}.#{scheme}\",\r\n\t\t\t\"sonar.projectName=#{project_name}.#{scheme}\",\r\n\t\t\t\"sonar.junit.reportsPath=build/#{scheme}.reports\",\r\n\t\t\t\"sonar.junit.include=*.junit\",\r\n\t\t\t\"sonar.sources=#{scheme}/#{scheme}\",\r\n\t\t\t\"sonar.tests=#{scheme}/#{scheme}Tests\",\r\n\t\t\t\"sonar.swift.lizard.report=build/#{scheme}.reports/lizard-report.xml\",\r\n\t\t\t\"sonar.swift.coverage.reportPattern=build/#{scheme}.reports/cobertura.xml\",\r\n\t\t\t\"sonar.swift.swiftlint.report=build/#{scheme}.reports/*swiftlint.txt\",\r\n\t\t\t\"sonar.swift.workspace=#{workspace}\",\r\n\t\t\t\"sonar.swift.project=#{scheme}/#{scheme}.xcodeproj\"\r\n\t\t]\r\n\r\n\t\tfinal_sonar_parameters = \"-D\" + sonar_parameters.join(\" -D\")\r\n\r\n\t\tsonar(\r\n\t\t\tproject_key:\"#{project_name}.#{scheme}\",\r\n\t\t\tproject_name:\"#{project_name}.#{scheme}\",\r\n\t\t\tsonar_runner_args: final_sonar_parameters)\r\n\tend\r\n\r\n    desc \"Runs unit tests for selected scheme\"\r\n\tprivate_lane :test_generic do |options|\r\n\r\n\t\tscheme = options[:scheme]\r\n\t\tdevices = options[:devices]\r\n\r\n\t\tscan(\r\n\t\t\tscheme: scheme,\r\n\t\t\tcode_coverage: true,\r\n\t\t\tclean: true,\r\n\t\t\tdevices: devices,\r\n\t\t\tderived_data_path: \"./build/#{scheme}.DerivedData\",\r\n\t\t\toutput_directory: \"./build/#{scheme}.reports/\")\r\n\tend\r\n\r\n\tprivate_lane :cleanAll do \r\n\t\tworkspace = workspace_name\r\n\t\tscheme = scheme_release\r\n\r\n\t\txcclean(workspace:  workspace_name,\r\n\t      \t\tscheme: scheme)\r\n\r\n\t\tclear_derived_data\r\n\tend\r\n\r\n\tprivate_lane :slackNotifier do |options|\r\n\t\tmessage = options[:message]\r\n\t\tslack(\r\n\t\t\tslack_url: \"https://hooks.slack.com/services/xxxx\",\r\n\t\t\tchannel: \"xxxxi\",\r\n\t\t\tmessage: \"#{message}\")\r\n\tend\r\n\r\n\r\n\tdesc \"Called on error\"\r\n\terror do |lane, exception, options|\r\n\t\tslackNotifier(message: exception)\t\r\n\tend\r\nend\r\n```\r\n</details>\r\n**No Appfile found**\r\n### fastlane gems\r\n\r\n| Gem                 | Version | Update-Status |\r\n| ------------------- | ------- | ------------- |\r\n| credentials_manager | 0.16.2  | ✅ Up-To-Date  |\r\n| spaceship           | 0.39.0  | ✅ Up-To-Date  |\r\n| fastlane_core       | 0.60.0  | ✅ Up-To-Date  |\r\n| deliver             | 1.16.2  | ✅ Up-To-Date  |\r\n| snapshot            | 1.17.0  | ✅ Up-To-Date  |\r\n| frameit             | 3.0.0   | ✅ Up-To-Date  |\r\n| pem                 | 1.4.1   | ✅ Up-To-Date  |\r\n| cert                | 1.4.5   | ✅ Up-To-Date  |\r\n| sigh                | 1.12.1  | ✅ Up-To-Date  |\r\n| produce             | 1.4.0   | ✅ Up-To-Date  |\r\n| gym                 | 1.13.0  | ✅ Up-To-Date  |\r\n| pilot               | 1.13.1  | ✅ Up-To-Date  |\r\n| scan                | 0.14.2  | ✅ Up-To-Date  |\r\n| supply              | 0.8.0   | ✅ Up-To-Date  |\r\n| match               | 0.11.1  | ✅ Up-To-Date  |\r\n| screengrab          | 0.5.6   | ✅ Up-To-Date  |\r\n| fastlane            | 1.111.0 | ✅ Up-To-Date  |\r\n\r\n\r\n### Loaded fastlane plugins:\r\n\r\n**No plugins Loaded**\r\n<details><summary><b>Loaded gems</b></summary>\r\n\r\n| Gem                       | Version      |\r\n| ------------------------- | ------------ |\r\n| did_you_mean              | 1.0.2        |\r\n| executable-hooks          | 1.3.2        |\r\n| bundler-unload            | 1.0.2        |\r\n| rubygems-bundler          | 1.4.4        |\r\n| bundler                   | 1.13.6       |\r\n| io-console                | 0.4.6        |\r\n| highline                  | 1.7.8        |\r\n| commander                 | 4.4.1        |\r\n| terminal-table            | 1.4.5        |\r\n| json                      | 1.8.3        |\r\n| multipart-post            | 2.0.0        |\r\n| faraday                   | 0.10.0       |\r\n| faraday_middleware        | 0.10.1       |\r\n| dotenv                    | 2.1.1        |\r\n| net-ssh                   | 3.2.0        |\r\n| net-sftp                  | 2.1.2        |\r\n| plist                     | 3.2.0        |\r\n| security                  | 0.1.3        |\r\n| krausefx-shenzhen         | 0.14.11      |\r\n| slack-notifier            | 1.5.1        |\r\n| CFPropertyList            | 2.3.4        |\r\n| claide                    | 1.0.1        |\r\n| colored                   | 1.2          |\r\n| nanaimo                   | 0.2.3        |\r\n| xcodeproj                 | 1.4.1        |\r\n| rouge                     | 1.11.1       |\r\n| xcpretty                  | 0.2.4        |\r\n| terminal-notifier         | 1.7.1        |\r\n| public_suffix             | 2.0.4        |\r\n| addressable               | 2.5.0        |\r\n| credentials_manager       | 0.16.2       |\r\n| multi_xml                 | 0.6.0        |\r\n| unf_ext                   | 0.0.7.2      |\r\n| unf                       | 0.1.4        |\r\n| domain_name               | 0.5.20161129 |\r\n| http-cookie               | 1.0.3        |\r\n| faraday-cookie_jar        | 0.0.6        |\r\n| babosa                    | 1.0.2        |\r\n| xcode-install             | 2.0.9        |\r\n| word_wrap                 | 1.0.0        |\r\n| multi_json                | 1.12.1       |\r\n| excon                     | 0.54.0       |\r\n| rubyzip                   | 1.1.7        |\r\n| gh_inspector              | 1.0.2        |\r\n| fastlane_core             | 0.60.0       |\r\n| fastimage                 | 1.6.8        |\r\n| mini_magick               | 4.5.1        |\r\n| xcpretty-travis-formatter | 0.0.4        |\r\n| uber                      | 0.0.15       |\r\n| representable             | 2.3.0        |\r\n| retriable                 | 2.1.0        |\r\n| mime-types-data           | 3.2016.0521  |\r\n| mime-types                | 3.1          |\r\n| hurley                    | 0.2          |\r\n| little-plugger            | 1.1.4        |\r\n| logging                   | 2.1.0        |\r\n| jwt                       | 1.5.6        |\r\n| memoist                   | 0.15.0       |\r\n| os                        | 0.9.6        |\r\n| signet                    | 0.7.3        |\r\n| googleauth                | 0.5.1        |\r\n| httpclient                | 2.8.3        |\r\n| google-api-client         | 0.9.20       |\r\n| i18n                      | 0.7.0        |\r\n| thread_safe               | 0.3.5        |\r\n| tzinfo                    | 1.2.2        |\r\n| activesupport             | 4.2.7.1      |\r\n</details>\r\n*generated on:* **2016-12-15**\r\n</details>\r\n\r\n##### Fastlane output\r\n\r\n```\r\n[13:35:03]: ▸ Touching App.app\r\n[13:37:09]: ▸ Signing /Users/jenkins/Library/Developer/Xcode/DerivedData/Main-dxwovjwuwgnfzygmrpkrhcvwkesr/Build/Intermediates/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/App.com.app\r\n[13:37:36]: ▸ Touching App.app.dSYM\r\n[13:37:37]: ▸ Archive Succeeded\r\n[13:37:37]: Generated plist file with the following values:\r\n[13:37:37]: ▸ -----------------------------------------\r\n[13:37:37]: ▸ {\r\n[13:37:37]: ▸   \"method\": \"ad-hoc\"\r\n[13:37:37]: ▸ }\r\n[13:37:37]: ▸ -----------------------------------------\r\n[13:37:37]: $ /usr/bin/xcrun /Users/jenkins/.rvm/gems/ruby-2.3.1/gems/gym-1.13.0/lib/assets/wrap_xcodebuild/xcbuild-safe.sh -exportArchive -exportOptionsPlist '/var/folders/q1/45d0dl9x52g0p0r2rq9ld3680000gn/T/gym_config20161215-45654-18u2704.plist' -archivePath /Users/jenkins/Library/Developer/Xcode/Archives/2016-12-15/App\\ 2016-12-15\\ 13.17.52.xcarchive -exportPath '/var/folders/q1/45d0dl9x52g0p0r2rq9ld3680000gn/T/gym_output20161215-45654-pz12s5' \r\n[14:03:54]: Compressing 32 dSYM(s)\r\n[14:03:54]: $ cd '/Users/jenkins/Library/Developer/Xcode/Archives/2016-12-15/App 2016-12-15 13.17.52.xcarchive/dSYMs' && zip -r '/Users/jenkins/.jenkins/jobs/Mobile-iOS-App-Develop/workspace/App.app.dSYM.zip' *.dSYM\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/fastlane/fastlane/issues/comments/268612034","html_url":"https://github.com/fastlane/fastlane/issues/7505#issuecomment-268612034","issue_url":"https://api.github.com/repos/fastlane/fastlane/issues/7505","id":268612034,"user":{"login":"hjanuschka","id":2891702,"avatar_url":"https://avatars.githubusercontent.com/u/2891702?v=3","gravatar_id":"","url":"https://api.github.com/users/hjanuschka","html_url":"https://github.com/hjanuschka","followers_url":"https://api.github.com/users/hjanuschka/followers","following_url":"https://api.github.com/users/hjanuschka/following{/other_user}","gists_url":"https://api.github.com/users/hjanuschka/gists{/gist_id}","starred_url":"https://api.github.com/users/hjanuschka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hjanuschka/subscriptions","organizations_url":"https://api.github.com/users/hjanuschka/orgs","repos_url":"https://api.github.com/users/hjanuschka/repos","events_url":"https://api.github.com/users/hjanuschka/events{/privacy}","received_events_url":"https://api.github.com/users/hjanuschka/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T19:07:02Z","updated_at":"2016-12-21T19:07:02Z","body":"@milch  oh well - i thought that might be the problem - let me know if can help in any way to tackle this."}}
{"actor":{"display_login":"hjanuschka"}}