ar.kalmykov created page: automated slack builds authored by Artem Kalmykov's avatar Artem Kalmykov
...@@ -25,7 +25,9 @@ ...@@ -25,7 +25,9 @@
* Go to http://gitlab.faifly.com/ and select your project. * Go to http://gitlab.faifly.com/ and select your project.
* Click "Setup CI" button. * Click "Setup CI" button.
* Copy-paste the following code: * Copy-paste the following code:
```stages:
```
stages:
- diawi - diawi
diawi_build: diawi_build:
...@@ -48,9 +50,43 @@ diawi_build: ...@@ -48,9 +50,43 @@ diawi_build:
* Find `Code Signing Identity` Field and select `iOS Distribution` for your distribution configuration. * Find `Code Signing Identity` Field and select `iOS Distribution` for your distribution configuration.
* Make sure `Development Team` is correctly selected for your distribution configuration. * Make sure `Development Team` is correctly selected for your distribution configuration.
* Go to https://developer.apple.com/ and generate AdHoc provisioning profiles for your project and make sure you have a correct signing identity to use them. * Go to https://developer.apple.com/ and generate AdHoc provisioning profiles for your project and make sure you have a correct signing identity to use them.
*
**3. Setup fastlane for the project.** **5. Setup fastlane for the project.**
* Run`fastlane init` and follow the instructions. * Run`fastlane init` and follow the instructions.
* * Open `Fastfile` for editing and copy-paste the following code:
\ No newline at end of file
```
default_platform :ios
platform :ios do
before_all do
ENV["SLACK_URL"] = "http://slack_url.com"
clear_derived_data
end
error do |lane, exception|
slack(
message: exception.message,
success: false
)
end
lane :diawi_build do |options|
update_project_codesigning(path: "MyApp.xcodeproj", use_automatic_signing: false)
gym(scheme: "MyAppScheme", configuration: "Release", export_method: "ad-hoc", xcargs: "PROVISIONING_PROFILE_SPECIFIER='PROV_PROFILE_NAME'", output_name: "build.ipa")
sh("./diawi_resp.sh '#{options[:slack_response_url]}'")
end
end
```
* Replace `http://slack_url.com` with your Webhook URL, created at step #1.
* Replace `MyApp.xcodeproj` with your Xcode project's filename (even if you use workspace).
* Replace `MyAppScheme` with your app's scheme name.
* Make sure configuration name matches yours.
* Replace `PROV_PROFILE_NAME` with your provisioning profile's name.
* Copy this file to fastlane folder in your project's root:
[diawi_resp.sh](/uploads/709a26f9e8b7d1518e6e0067ff2ae538/diawi_resp.sh)
* (Optional) You may want to run `fastlane ios diawi_build` to make sure everything is setup correctly.
\ No newline at end of file