Skip to content

Commit

Permalink
Add PR Scheme for iOs build
Browse files Browse the repository at this point in the history
Build PR Scheme in PR build

use named parameters, use pr_build boolean

Signed-off-by: Jakub Sokołowski <jakub@status.im>

Enable capabilities

Signed-off-by: Jakub Sokołowski <jakub@status.im>

Add custom app icon

Remove user defined profile

Add PR scheme

Explicit provide provisioning profiles

Fix pr schema

Bump jenkins

Pod bump

Describe pr_build argument

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
  • Loading branch information
Ferossgp committed Jun 29, 2020
1 parent c943f5f commit d916751
Show file tree
Hide file tree
Showing 29 changed files with 719 additions and 46 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ DerivedData
*.ipa
*.xcuserstate
project.xcworkspace
xcshareddata

# Android/IJ
#
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.android
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library 'status-react-jenkins@v1.1.7'
library 'status-react-jenkins@v1.1.8'

pipeline {
agent { label 'linux' }
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.combined
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library 'status-react-jenkins@v1.1.7'
library 'status-react-jenkins@v1.1.8'

pipeline {
agent { label 'linux' }
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.ios
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library 'status-react-jenkins@v1.1.7'
library 'status-react-jenkins@v1.1.8'

pipeline {
agent { label 'macos-xcode-11.5' }
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.linux
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library 'status-react-jenkins@v1.1.7'
library 'status-react-jenkins@v1.1.8'

pipeline {
agent { label 'linux' }
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.macos
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library 'status-react-jenkins@v1.1.7'
library 'status-react-jenkins@v1.1.8'

pipeline {
agent { label 'macos-xcode-11.5' }
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.nix-cache
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library 'status-react-jenkins@v1.1.7'
library 'status-react-jenkins@v1.1.8'

pipeline {
agent { label params.AGENT_LABEL }
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.windows
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library 'status-react-jenkins@v1.1.7'
library 'status-react-jenkins@v1.1.8'

pipeline {
agent { label 'linux' }
Expand Down
2 changes: 1 addition & 1 deletion ci/tools/Jenkinsfile.fastlane-clean
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library 'status-react-jenkins@v1.1.7'
library 'status-react-jenkins@v1.1.8'

pipeline {
agent { label 'macos' }
Expand Down
2 changes: 1 addition & 1 deletion ci/tools/Jenkinsfile.playstore-meta
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library 'status-react-jenkins@v1.1.7'
library 'status-react-jenkins@v1.1.8'

pipeline {
agent { label 'linux' }
Expand Down
6 changes: 6 additions & 0 deletions fastlane/Appfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ app_identifier('im.status.ethereum') # The bundle identifier of your app
apple_id(ENV['FASTLANE_APPLE_ID']) # Your Apple email address
itc_team_id('118430139') # iTunes Connect Team ID

for_platform :ios do
for_lane :pr do
app_identifier('im.status.ethereum.pr')
end
end

# Android

# json_key_file('') # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
Expand Down
30 changes: 24 additions & 6 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,38 @@ end
# `readonly`:
# if true - only fetch existing certificates and profiles, don't upgrade from AppStoreConnect
# if false - read list of devices from AppStoreConnect, and upgrade the provisioning profiles from it
def build_ios_adhoc(readonly)
# `pr_build`:
# if true - uses StatusImPR scheme and postfixed app id with `.pr` to build an app, which can be used in parallel with release
# if false - uses StatusIm scheme to build the release app

def build_ios_adhoc(readonly: false, pr_build: false)
# PR builds should appear as a separate App on iOS
scheme = pr_build ? 'StatusImPR' : 'StatusIm'
app_id = pr_build ? 'im.status.ethereum.pr' : 'im.status.ethereum'

match(
type: 'adhoc',
force_for_new_devices: true,
readonly: readonly,
app_identifier: app_id,
keychain_name: 'login.keychain'
)

build_ios_app(
scheme: 'StatusIm',
scheme: scheme,
workspace: 'ios/StatusIm.xcworkspace',
configuration: 'Release',
clean: true,
export_method: 'ad-hoc',
output_directory: 'status-adhoc'
output_name: 'StatusIm',
output_directory: 'status-adhoc',
export_options: {
signingStyle: 'manual',
provisioningProfiles: {
"im.status.ethereum": "match AdHoc im.status.ethereum",
"im.status.ethereum.pr": "match AdHoc im.status.ethereum.pr"
}
}
)
end

Expand Down Expand Up @@ -165,7 +182,7 @@ platform :ios do
desc 'This .ipa is ready to be distibuted through diawi.com'
lane :adhoc do
unlock_keychain_if_needed
build_ios_adhoc(true)
build_ios_adhoc(readonly: true)
end

desc '`fastlane ios e2e` - e2e lane for iOS.'
Expand All @@ -180,21 +197,22 @@ platform :ios do
desc 'This lane builds a new adhoc build and leaves an .ipa that is ad-hoc signed (can be uploaded to diawi)'
lane :pr do
unlock_keychain_if_needed
build_ios_adhoc(false)
build_ios_adhoc(pr_build: true)
end

desc '`fastlane ios nightly` - makes a new nightly'
desc 'This lane builds a new nightly and leaves an .ipa that is ad-hoc signed (can be uploaded to diawi)'
lane :nightly do
unlock_keychain_if_needed
build_ios_adhoc(false)
build_ios_adhoc()
end

desc '`fastlane ios release` builds a release & uploads it to TestFlight'
lane :release do
match(
type: 'appstore',
readonly: true,
app_identifier: 'im.status.ethereum',
keychain_name: 'login.keychain'
)

Expand Down
2 changes: 1 addition & 1 deletion fastlane/Matchfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ git_url('git@github.com:status-im/ios-certificates.git')

type('development') # The default type, can be: appstore, adhoc, enterprise or development

# app_identifier(['tools.fastlane.app', 'tools.fastlane.app2'])
app_identifier(['im.status.ethereum', 'im.status.ethereum.pr'])
username(ENV['FASTLANE_APPLE_ID']) # Your Apple Developer Portal username

# For all available options run `fastlane match --help`
Expand Down
17 changes: 12 additions & 5 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def flipper_post_install(installer)
end
end

target 'StatusIm' do
abstract_target 'Status' do
# Pods for StatusQuo
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
Expand Down Expand Up @@ -81,14 +81,21 @@ target 'StatusIm' do
pod 'SQLCipher', '~>3.0'
pod 'SSZipArchive'

target 'StatusIm' do
target 'StatusImTests' do
inherit! :complete
# Pods for testing
end
end

target 'StatusImPR' do
end

add_flipper_pods!
post_install do |installer|
flipper_post_install(installer)
end
target 'StatusImTests' do
inherit! :complete
# Pods for testing
end


use_native_modules!
end
8 changes: 4 additions & 4 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ PODS:
- React
- react-native-splash-screen (3.2.0):
- React
- react-native-webview (9.4.0):
- react-native-webview (10.3.1):
- React
- React-RCTActionSheet (0.62.2):
- React-Core/RCTActionSheetHeaders (= 0.62.2)
Expand Down Expand Up @@ -588,7 +588,7 @@ SPEC CHECKSUMS:
react-native-safe-area-context: 60f654e00b6cc416573f6d5dbfce3839958eb57a
react-native-shake: de052eaa3eadc4a326b8ddd7ac80c06e8d84528c
react-native-splash-screen: 200d11d188e2e78cea3ad319964f6142b6384865
react-native-webview: cf5527893252b3b036eea024a1da6996f7344c74
react-native-webview: 40bbeb6d011226f34cb83f845aeb0fdf515cfc5f
React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c
React-RCTAnimation: 49ab98b1c1ff4445148b72a3d61554138565bad0
React-RCTBlob: a332773f0ebc413a0ce85942a55b064471587a71
Expand Down Expand Up @@ -618,6 +618,6 @@ SPEC CHECKSUMS:
Yoga: 3ebccbdd559724312790e7742142d062476b698e
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 23557eb8cb46b1c5dd060326fe1873a162394149
PODFILE CHECKSUM: f66349c5bfb9c21ac968307ea5a2d6c2dd4091ed

COCOAPODS: 1.9.1
COCOAPODS: 1.9.3
Loading

0 comments on commit d916751

Please sign in to comment.