Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
fbb90c7
feat: add fastlane save\restore cache config; comment not needed jobs;
IlarionHalushka Jul 2, 2019
39d0f18
install fastlane using 'bundle install'
IlarionHalushka Jul 2, 2019
85d0b08
install fastlane using 'sudo bundle install'
IlarionHalushka Jul 2, 2019
f40a541
uncomment ios build commands
IlarionHalushka Jul 2, 2019
d970f5f
run set up google services in ios folder
IlarionHalushka Jul 2, 2019
97dc4c6
add working_directory: ios to ios-build steps
IlarionHalushka Jul 2, 2019
269654b
remove 'cd ios' from Fastlane build step
IlarionHalushka Jul 2, 2019
2199a47
add save\restore cache for npm modules
IlarionHalushka Jul 2, 2019
273bae9
group save_cache steps
IlarionHalushka Jul 2, 2019
f04ae75
cache fastlane in ios-testflight job
IlarionHalushka Jul 2, 2019
5f29c8d
uncomment previously commented jobs\steps
IlarionHalushka Jul 2, 2019
9729e3e
fix: add missing colon
IlarionHalushka Jul 2, 2019
af4a14c
use key for caching: node-modules-{{ checksum ".circleci/config.yml" …
IlarionHalushka Jul 2, 2019
d7205f8
add names for save\restore steps
IlarionHalushka Jul 2, 2019
c72bf09
ci: add `default` step with `working_directory: ~/repo` to ios-build job
IlarionHalushka Jul 3, 2019
fe858a2
return back caching npm: `node-v1-{{ checksum "package.json" }}-{{ ar…
IlarionHalushka Jul 3, 2019
aaedf78
fix: add missing curly braces
IlarionHalushka Jul 3, 2019
841abbd
save\restore cache in e2e-test job; remove {{arch}} from cache names
IlarionHalushka Jul 3, 2019
2b7becf
Merge branch 'develop' into ci/save-restore-cache-for-ios-jobs
diegolmello Jul 3, 2019
ed2a1cf
add names to restore_cache steps in android-build job
IlarionHalushka Jul 3, 2019
6d43340
add names to save_cache steps in android-build job
IlarionHalushka Jul 3, 2019
82c2f01
add names to all save\restore steps; change checksum package.json to …
IlarionHalushka Jul 3, 2019
257f802
change `npm` to `NPM` in steps naming
IlarionHalushka Jul 3, 2019
495eb16
remove {{ checksum circle ci }} from android-build job and fix naming…
IlarionHalushka Jul 3, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 65 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
- checkout

- restore_cache:
key: node-modules-{{ checksum ".circleci/config.yml" }}-{{ checksum "yarn.lock" }}
name: Restore NPM cache
key: node-modules-{{ checksum "yarn.lock" }}

- run:
name: Install NPM modules
Expand All @@ -38,7 +39,8 @@ jobs:
yarn codecov

- save_cache:
key: node-modules-{{ checksum ".circleci/config.yml" }}-{{ checksum "yarn.lock" }}
key: node-modules-{{ checksum "yarn.lock" }}
name: Save NPM cache
paths:
- ./node_modules

Expand All @@ -52,6 +54,10 @@ jobs:
steps:
- checkout

- restore_cache:
name: Restore NPM cache
key: node-v1-mac-{{ checksum "yarn.lock" }}

- run:
name: Install Node 8
command: |
Expand Down Expand Up @@ -84,6 +90,12 @@ jobs:
command: |
detox test --configuration ios.sim.release --cleanup

- save_cache:
name: Save NPM cache
key: node-v1-mac-{{ checksum "yarn.lock" }}
paths:
- node_modules

- store_artifacts:
path: /tmp/screenshots

Expand All @@ -103,15 +115,17 @@ jobs:
- checkout

- restore_cache:
key: node-modules-{{ checksum ".circleci/config.yml" }}-{{ checksum "yarn.lock" }}
name: Restore NPM cache
key: node-modules-{{ checksum "yarn.lock" }}

- run:
name: Install NPM modules
command: |
yarn

- restore_cache:
key: android-{{ checksum ".circleci/config.yml" }}-{{ checksum "android/build.gradle" }}-{{ checksum "android/app/build.gradle" }}
name: Restore gradle cache
key: android-{{ checksum "android/build.gradle" }}-{{ checksum "android/app/build.gradle" }}

- run:
name: Configure Gradle
Expand Down Expand Up @@ -155,12 +169,14 @@ jobs:
path: /tmp/build/outputs

- save_cache:
key: node-modules-{{ checksum ".circleci/config.yml" }}-{{ checksum "yarn.lock" }}
name: Save NPM cache
key: node-modules-{{ checksum "yarn.lock" }}
paths:
- ./node_modules

- save_cache:
key: android-{{ checksum ".circleci/config.yml" }}-{{ checksum "android/build.gradle" }}-{{ checksum "android/app/build.gradle" }}
name: Save gradle cache
key: android-{{ checksum "android/build.gradle" }}-{{ checksum "android/app/build.gradle" }}
paths:
- ~/.gradle

Expand All @@ -174,6 +190,14 @@ jobs:
steps:
- checkout

- restore_cache:
name: Restore gems cache
key: bundle-v1-{{ checksum "ios/Gemfile.lock" }}

- restore_cache:
name: Restore NPM cache
key: node-v1-mac-{{ checksum "yarn.lock" }}

- run:
name: Install Node 8
command: |
Expand All @@ -184,37 +208,48 @@ jobs:
nvm install 8

- run:
name: Update Fastlane
name: Install NPM modules
command: |
brew update
brew install ruby
sudo gem install fastlane
yarn

- run:
name: Install NPM modules
name: Update Fastlane
command: |
yarn
sudo bundle install
working_directory: ios

- run:
name: Set Google Services
command: |
cd ios
cp GoogleService-Info.prod.plist GoogleService-Info.plist
working_directory: ios

- run:
name: Fastlane Build
no_output_timeout: 1200
command: |
cd ios
agvtool new-version -all $CIRCLE_BUILD_NUM

if [[ $MATCH_KEYCHAIN_NAME ]]; then
fastlane ios release
bundle exec fastlane ios release
else
export MATCH_KEYCHAIN_NAME="temp"
export MATCH_KEYCHAIN_PASSWORD="temp"
fastlane ios build
bundle exec fastlane ios build
fi
working_directory: ios

- save_cache:
name: Save NPM cache
key: node-v1-mac-{{ checksum "yarn.lock" }}
paths:
- node_modules

- save_cache:
name: Save gems cache
key: bundle-v1-{{ checksum "ios/Gemfile.lock" }}
paths:
- vendor/bundle

- store_artifacts:
path: ios/RocketChatRN.ipa
Expand All @@ -235,18 +270,27 @@ jobs:
- attach_workspace:
at: ios

- restore_cache:
name: Restore gems cache
key: bundle-v1-{{ checksum "ios/Gemfile.lock" }}

- run:
name: Update Fastlane
command: |
brew update
brew install ruby
sudo gem install fastlane
sudo bundle install
working_directory: ios

- run:
name: Fastlane Tesflight Upload
command: |
cd ios
fastlane pilot upload --ipa ios/RocketChatRN.ipa --changelog "$(sh ../.circleci/changelog.sh)"
bundle exec fastlane pilot upload --ipa ios/RocketChatRN.ipa --changelog "$(sh ../.circleci/changelog.sh)"
working_directory: ios

- save_cache:
name: Save gems cache
key: bundle-v1-{{ checksum "ios/Gemfile.lock" }}
paths:
- vendor/bundle

workflows:
version: 2
Expand Down
2 changes: 2 additions & 0 deletions ios/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source "https://rubygems.org"
gem 'fastlane'
159 changes: 159 additions & 0 deletions ios/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.0)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
atomos (0.1.3)
babosa (1.0.2)
claide (1.0.2)
colored (1.2)
colored2 (3.1.2)
commander-fastlane (4.4.6)
highline (~> 1.7.2)
declarative (0.0.10)
declarative-option (0.1.0)
digest-crc (0.4.1)
domain_name (0.5.20180417)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.4)
emoji_regex (1.0.1)
excon (0.64.0)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
http-cookie (~> 1.0.0)
faraday_middleware (0.13.1)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.5)
fastlane (2.126.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
babosa (>= 1.0.2, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander-fastlane (>= 4.4.6, < 5.0.0)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 2.0)
excon (>= 0.45.0, < 1.0.0)
faraday (~> 0.9)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 0.9)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-api-client (>= 0.21.2, < 0.24.0)
google-cloud-storage (>= 1.15.0, < 2.0.0)
highline (>= 1.7.2, < 2.0.0)
json (< 3.0.0)
jwt (~> 2.1.0)
mini_magick (~> 4.5.1)
multi_xml (~> 0.5)
multipart-post (~> 2.0.0)
plist (>= 3.1.0, < 4.0.0)
public_suffix (~> 2.0.0)
rubyzip (>= 1.2.2, < 2.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
slack-notifier (>= 2.0.0, < 3.0.0)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.8.1, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
gh_inspector (1.1.3)
google-api-client (0.23.9)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.5, < 0.7.0)
httpclient (>= 2.8.1, < 3.0)
mime-types (~> 3.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.9)
google-cloud-core (1.3.0)
google-cloud-env (~> 1.0)
google-cloud-env (1.2.0)
faraday (~> 0.11)
google-cloud-storage (1.16.0)
digest-crc (~> 0.4)
google-api-client (~> 0.23)
google-cloud-core (~> 1.2)
googleauth (>= 0.6.2, < 0.10.0)
googleauth (0.6.7)
faraday (~> 0.12)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.7)
highline (1.7.10)
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
json (2.2.0)
jwt (2.1.0)
memoist (0.16.0)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.0331)
mini_magick (4.5.1)
multi_json (1.13.1)
multi_xml (0.6.0)
multipart-post (2.0.0)
nanaimo (0.2.6)
naturally (2.2.0)
os (1.0.1)
plist (3.5.0)
public_suffix (2.0.5)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rouge (2.0.7)
rubyzip (1.2.3)
security (0.1.3)
signet (0.11.0)
addressable (~> 2.3)
faraday (~> 0.9)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.5)
CFPropertyList
naturally
slack-notifier (2.3.2)
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
tty-cursor (0.7.0)
tty-screen (0.7.0)
tty-spinner (0.9.1)
tty-cursor (~> 0.7)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.6)
unicode-display_width (1.6.0)
word_wrap (1.0.0)
xcodeproj (1.10.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.6)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.0)
xcpretty (~> 0.2, >= 0.0.7)

PLATFORMS
ruby

DEPENDENCIES
fastlane

BUNDLED WITH
2.0.2
1 change: 1 addition & 0 deletions ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ platform :ios do
# ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
# cocoapods
# carthage
setup_circle_ci
create_keychain(
name: ENV["MATCH_KEYCHAIN_NAME"],
password: ENV["MATCH_KEYCHAIN_PASSWORD"],
Expand Down