Last active
April 28, 2016 10:01
-
-
Save escapedcat/07e37eeed1d50c4336bd to your computer and use it in GitHub Desktop.
Cordova iOS App deployment to HockeyApp using Fastlane / Match / Gym; including code signing identity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Customise this file, documentation can be found here: | |
# https://github.com/fastlane/fastlane/tree/master/docs | |
# All available actions: https://github.com/fastlane/fastlane/blob/master/docs/Actions.md | |
# can also be listed using the `fastlane actions` command | |
# Change the syntax highlighting to Ruby | |
# All lines starting with a # are ignored when running `fastlane` | |
# By default, fastlane will send which actions are used | |
# No personal data is shared, more information on https://github.com/fastlane/enhancer | |
# Uncomment the following line to opt out | |
# opt_out_usage | |
# If you want to automatically update fastlane if a new version is available: | |
# update_fastlane | |
# This is the minimum version number required. | |
# Update this, if you use features of a newer version | |
fastlane_version "1.64.0" | |
default_platform :ios | |
platform :ios do | |
before_all do | |
# ENV["SLACK_URL"] = "https://hooks.slack.com/services/..." | |
ENV["MATCH_FORCE_ENTERPRISE"] = "1" | |
end | |
desc "Runs all the tests" | |
lane :test do | |
scan | |
end | |
desc "Deploy a new version to HockeyApp" | |
lane :dist do | |
match( | |
git_url: ENV["GIT_CERTS"], | |
type: "enterprise", | |
username: ENV["APPLE_ID"], | |
app_identifier: ENV["APP_ID"], | |
keychain_name: ENV["JOB_NAME"] + '-' + ENV["BUILD_NUMBER"] + '.keychain', | |
readonly: "true" | |
) | |
gym( | |
project: './build-cordova/platforms/ios/' + ENV["APP_NAME"] + '.xcodeproj', | |
scheme: ENV["APP_NAME"], | |
use_legacy_build_api: "true", | |
export_method: "enterprise", | |
codesigning_identity: ENV["CODESIGNING_IDENTITY"] | |
) | |
hockey( | |
api_token: ENV["HA_API_TOKEN"], | |
ipa: ENV["APP_NAME"] + '.ipa', | |
notify: "0" | |
) | |
end | |
# You can define as many lanes as you want | |
after_all do |lane| | |
# This block is called, only if the executed lane was successful | |
# slack( | |
# message: "Successfully deployed new App Update." | |
# ) | |
end | |
error do |lane, exception| | |
# slack( | |
# message: exception.message, | |
# success: false | |
# ) | |
end | |
end | |
# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/docs/Platforms.md | |
# All available actions: https://github.com/fastlane/fastlane/blob/master/docs/Actions.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var APP_ID = process.env.APP_ID || 'com.company.app'; | |
var APP_NAME = process.env.APP_NAME || 'appname.default'; | |
var JOB_NAME = process.env.JOB_NAME || 'jenkins-ci-job'; | |
var BUILD_NUMBER = process.env.BUILD_NUMBER || 000; | |
var KEYCHAIN = JOB_NAME + '-' + BUILD_NUMBER + '.keychain'; | |
gulp.task('xcode:ipa', shell.task([ | |
'security -v create-keychain -p cici1234 ' + KEYCHAIN, | |
// NOT NEEDED! only one default in general is needed (hudson.keychain exists already) - just still here because | |
// 'security -v default-keychain -s ' + keychain, | |
'security list-keychains -s ' + KEYCHAIN, | |
'security -v unlock-keychain -p cici1234 ' + KEYCHAIN, | |
'fastlane dist', | |
'security -v delete-keychain ' + KEYCHAIN, | |
'rm -v ~/Library/MobileDevice/Provisioning\\ Profiles/*' | |
])); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// to create a new (dist) cert for a newly created appid | |
MATCH_FORCE_ENTERPRISE="1" match enterprise -a "com.company.app" -r "ssh://[email protected]/project/certs.git" -u "[email protected]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment