-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added CI docs to playbook * Fixing image link * Cleanup * Update README.md Co-Authored-By: Dominik Hádl <[email protected]> * Addess PR changes * Updating ssh files * Fixing setup guide
- Loading branch information
1 parent
3ea4cb3
commit 184203c
Showing
14 changed files
with
225 additions
and
3 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Nodes iOS CI - Guide | ||
|
||
## Configuration ⚙️ | ||
|
||
We have two levels of configuration on [project.yml](./project.yml) file. | ||
In the first level we have the information regarding the whole project and the second level is **Target** specific. | ||
|
||
According to the configuration you'll tell the CI to make builds for different targets, extensions and configurations. | ||
|
||
#### First level - Project | ||
|
||
- **xcodeproj: String** - The name of the xcode project file. ❗️ | ||
- **workspace: String** - The name of the xcode workspace file. | ||
- **configuration: String** - Name of the build configuration, e.g. "Staging" or "Release". ❗️ | ||
- **ci-version: Number** - **`0.1`**, **`0.2`**, or **`1.0`**. Default is currently **`0.2`** | ||
- **hockey-upload: Bool** - Enables uploads to hockey. This is automatically `true` if testflight uploads are enabled.❗️ | ||
- **testflight-upload: Bool** - Enables uploads to testflight.❗️ | ||
- **disable-hockey-version-check: Bool** - Disable Hockey version check to avoid errors when build number <= current build number on Hockey. Not required, defaults to `false` | ||
- **slack-channel: String** - The name of the channel to report successful builds to.❗️ | ||
- **targets: [String: Target]** - List of target settings.❗️ | ||
|
||
|
||
#### Second level - Target | ||
|
||
- **enabled**: **Boolean** - Makes the target available for building.❗️ | ||
- **scheme**: **String** - The name of the scheme to build. Usually this is the same as the name of the target.❗️ | ||
- **hockey-app-id**: **String** - The app ID used for uploading to hockey.❗️ | ||
- **testflight-upload-account**: **String** - The email for the Apple ID used to upload to App Store Connect. Default value depends on CI version: 0.1 and 1.0 use [email protected], 0.2 uses [email protected] | ||
- **itc_provider**: **String** - The `ShortName` for the associated AppStore Connect team. | ||
- **team-name**: **String** - Apple Developer team name. This should match the distribution certificate's team name. | ||
- **extensions-bundle-ids**: **[String]** - An array of bundle ID's used in app extension. | ||
- **enable-badge**: **Boolean** - Enables the use of `fastlane badge` for non "Release" configurations. | ||
|
||
> ❗️- Mandatory keys | ||
## Template: | ||
|
||
*project.yml* | ||
|
||
```ruby | ||
# This is the project config file | ||
xcodeproj: "REPLACE_PROJECT_NAME.xcodeproj" | ||
configuration: "Test" # Possible configurations: Debug | Test | Release | ||
ci-version: 1.0 | ||
hockey-upload: true | ||
testflight-upload: false | ||
slack-channel: "REPLACE_SLACK_CHANNEL" # replace with your project's Slack Channel name | ||
targets: | ||
REPLACE_PROJECT_NAME: | ||
enabled: true | ||
scheme: "REPLACE_PROJECT_NAME" | ||
hockey-app-id: | ||
Debug: "REPLACE_HOCKEY_DEVELOPMENT" | ||
Test: "REPLACE_HOCKEY_STAGING" | ||
Release: "REPLACE_HOCKEY_PRODUCTION" | ||
|
||
|
||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Nodes iOS Bitrise - Common issues 🤯 | ||
|
||
If you run into issues this list of things might help you! | ||
In case you find a new error and fixed it please update this doc to help your colleagues! 🙂 | ||
|
||
## Issues: | ||
|
||
##### error: No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "id" with a private key was found | ||
|
||
If you see this error using v0.2, Go into your build settings -> Code Signing Identity, and manually select Automatic: iOS Developer or iOS Distribution for your *target* and not the project. This error occurs when the target inherits the code signing identity value from the project. | ||
|
||
-- | ||
|
||
##### Prepare repository fails at checking Hockey version | ||
This happens due to the info plist path in the Xcode project containing a variable, which is usually expanded by Xcode, however, it isn't by the CI script. | ||
|
||
Easiest way to fix this issue is by removing the variable part (usually `$(SRCROOT)`) from the info plist path in your target build settings. | ||
|
||
-- | ||
|
||
##### ITC Providers during Testflight upload | ||
If you get this error: | ||
`Your Apple ID account is attached to other iTunes providers. You will need to specify which provider you intend to submit content to by using the -itc_provider command` | ||
|
||
For some reason, sometimes the team name isn't enough to tell iTunes Connect which team to upload to. You need to add an extra field like this `itc_provider: "ZLCKLX4ACJ"` to that target in the project.yml file. That value is the Team ID from your account membership page in the developer portal. More info here: https://medium.com/@nickmeehan/fastlane-testflight-and-itc-provider-9233a3c4b5e5 | ||
|
||
-- | ||
|
||
##### Mutiple teams found | ||
|
||
**Note** This one should be solved. If you still get this error, open an issue so we can see what's going wrong | ||
|
||
|
||
If you see this message when trying to upload to Testflight: `Multiple iTunes Connect Teams found; unable to choose, terminal not ineractive!` | ||
|
||
This means fastlane couldn't figure out which team to upload to. The easiest way to fix this is to add an environment variable with either the team name or team id. In the workflow editor, click Env Vars, and add a new variable under the deploy-testflight workflow. `FASTLANE_ITC_TEAM_ID` = `<team id>`, or `FASTLANE_ITC_TEAM_NAME` = `<team name>`. The team name and ID can be found in logs from the build that failed (there will be a list of teams that it couldn't choose from). Take a look at the fitness DK project for an example of this. | ||
|
||
-- | ||
|
||
##### Exit 65 - ARCHIVE FAILED error | ||
|
||
Your Xcode archived/build suceeds fine, but CI/fastlane archiving fails with exit code 65? Inspect your Xcode build/archive log for any errors that are outputted - surprisingly Xcode lets you finish the archive while running `xcodebuild` from the commandline (which is what fastlane does) fails horribly. | ||
|
||
For example, in one project a `find` command in a custom build phase was outputting an error where it couldn't find a directory. | ||
|
||
Search for this error in your Xcode log, if you think something similar to the above might be the cause: | ||
`Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure` | ||
|
||
-- | ||
|
||
##### Codesign error, export failed during Fastlane gym phase | ||
|
||
Make sure you remove the translations model generator from your project. It should exist in the project directory but not referenced or linked in the actual xcodeproj. | ||
|
||
-- | ||
|
||
##### Loading settings from project.yml | ||
|
||
``` | ||
+ ruby /var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/bitrise034957535/step_src/parse_project_settings.rb | ||
/usr/local/lib/ruby/gems/2.4.0/gems/xcodeproj-1.5.3/lib/xcodeproj/project.rb:217:in `initialize_from_file': [Xcodeproj] Unknown object version. (RuntimeError) | ||
from /usr/local/lib/ruby/gems/2.4.0/gems/xcodeproj-1.5.3/lib/xcodeproj/project.rb:102:in `open' | ||
from /var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/bitrise034957535/step_src/parse_project_settings.rb:80:in `<main>' | ||
``` | ||
We've seen this issue being causes by 2 things: | ||
1. The schemes are not shared | ||
Solution: Share the schemes from xCode -> Product -> Scheme -> Manage schemes -> Make sure "Shared" is checked. | ||
2. The xCode version you are using does not match the stack on the Bitrise project. | ||
Solution: Change the default stack in Bitrise -> Workflow -> Stack |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Nodes iOS Bitrise - Setup Guide 🛠 | ||
|
||
Setting up Bitrise is simple and we described in 3 steps: | ||
|
||
- [Xcode setup](#Xcode-setup) | ||
- [App setup on Bitrise](#App-setup-on-Bitrise) | ||
- [Bitrise workflow integration](#Bitrise-workflow-integration) | ||
|
||
## Xcode setup | ||
|
||
Make sure your project's schemes are ***shared (including app extensions)*** , otherwise you will run into a lot of warnings and it might not build all of your targets. | ||
|
||
|
||
## App setup on Bitrise | ||
|
||
1) Create a *New App* from the Bitrise dashboard | ||
- Make sure you choose **Nodes** account when creating the *New App* and make it **Private** | ||
|
||
<p align="center"> | ||
<img src="../images/ci/01-new-app-bitrise.jpg?raw=true" alt="New App"/> | ||
</p> | ||
|
||
2) Connect the repository to Bitrise | ||
|
||
<p align="center"> | ||
<img src="../images/ci/02-new-app-bitrise.jpg?raw=true" alt="New App"/> | ||
</p> | ||
|
||
3) When setting up the access make sure to auto add SSH key. | ||
|
||
<p align="center"> | ||
<img src="../images/ci/03-new-app-bitrise.jpg?raw=true" alt="New App"/> | ||
</p> | ||
|
||
4) Indicate which branch Bitrise should use to make the builds | ||
|
||
<p align="center"> | ||
<img src="../images/ci/04-new-app-bitrise.jpg?raw=true" alt="New App"/> | ||
</p> | ||
|
||
5) After choosing the branch, Bitrise will validate the source code and then you can select the *export method* you want to use. Usually is **app-store** | ||
|
||
<p align="center"> | ||
<img src="../images/ci/05-new-app-bitrise.jpg?raw=true" alt="New App"/> | ||
</p> | ||
|
||
6) The last step is the Webhook setup. It will create a link from the github repository to Bitrise. | ||
|
||
<p align="center"> | ||
<img src="../images/ci/06-new-app-bitrise.jpg?raw=true" alt="New App"/> | ||
</p> | ||
|
||
|
||
## Bitrise workflow integration | ||
|
||
In order to make everything work on Bitrise you'll need to copy the template content from [bitrise.yml](https://github.com/nodes-projects/ci-resources-ios/blob/master/bitrise.yml) into the Bitrise workflow script. | ||
|
||
You can find the detailed workflow description [here](https://github.com/nodes-ios/bitrise-step-nodes-custom-script) | ||
|
||
<p align="center"> | ||
<img src="../images/ci/07-new-app-bitrise.jpg?raw=true" alt="New App"/> | ||
</p> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This is the project config file | ||
xcodeproj: "REPLACE_PROJECT_NAME.xcodeproj" | ||
configuration: "Test" # Possible configurations: Debug | Test | Release | ||
ci-version: 1.0 | ||
hockey-upload: true | ||
testflight-upload: false | ||
slack-channel: "REPLACE_SLACK_CHANNEL" # replace with your project's Slack Channel name | ||
targets: | ||
REPLACE_PROJECT_NAME: | ||
enabled: true | ||
scheme: "REPLACE_PROJECT_NAME" | ||
hockey-app-id: | ||
Debug: "REPLACE_HOCKEY_DEVELOPMENT" | ||
Test: "REPLACE_HOCKEY_STAGING" | ||
Release: "REPLACE_HOCKEY_PRODUCTION" | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes