Wikimedia Apps/Team/iOS/CI/Deployment
Deploying a build
[edit]Deploying Builds is done using git to communicate with the Jenkins Build server. Jenkins is watching for changes in specific branches. Making changes to these branch will kick off a build process.
Beta Builds
[edit]To deploy a new beta build:
- Checkout the develop branch from https://github.com/wikimedia/wikipedia-ios/ and pull in the latest changes
- Checkout the release-beta branch
- Merge develop into release-beta
- Push release-beta
This will start the build within 5 minutes. When the build starts, Jenkins will post a notification in the #wikimedia-ios-notifications channel. Before deployment, Jenkins will run tests on the platforms/OSs specified in the fastfile. Note that beta builds have special configuration to expose development menus and use beta API Keys. These should never be submitted to the App Store.
When the build is complete:
- Jenkins will merge release-beta into the beta branch and push the changes
- Jenkins will create and push a new tag for the release in the format: betas/5.x.x.build_number
- Jenkins will push the build to iTunes Connect / Testflgiht. The build will be available to internal beta testers as soon as it is processed
Release Builds
[edit]To deploy a new release build:
- Checkout the beta branch from https://github.com/wikimedia/wikipedia-ios/ and pull in the latest changes
- Checkout the release branch
- Merge master into release (this ensures no conflicts when the build server merges the release branch into master)
- Merge beta into release
- Push release
- Native json master
This will start the build within 5 minutes. When the build starts, Jenkins will post a notification in the #wikimedia-ios-notifications channel. Note that this build is configured for App Store deployment - it has all production keys and no developer tools are enabled.
When the build is complete:
- Jenkins will merge release into the master branch and push the changes
- Jenkins will create and push a new tag for the release in the format: releases/5.x.x.build_number
- Jenkins will push the build to iTunes Connect / Testflgiht. The build will be available to internal beta testers as soon as it is processed.
Providing external testers access to a beta
[edit]Access to builds for external testers is a manual process. To make a build available, log into iTunes Connect. The iTunes connect UI changes frequently, so you should refer to Apple's documentation for instructions - or just ask an iOS engineer.
Note: the first build of any new version must be reviewed by Apple before it can be sent to external testers. Because of this, it is a good practice to submit a build for beta app review at the first possible opportunity even if you have no intention of deploying it externally. This will ensure there are no delays when you want to send a build to external testers. (If you forget it is ok, the process is quick⌠usually a day or less)
Submitting to the App Store
[edit]Submitting a build to the App Store is a manual process. To submit a build, log into iTunes Connect. The iTunes connect UI changes frequently, so you should refer to Apple's documentation for instructions - or just ask an iOS engineer.
Notes on TestFlight and versioning
[edit]TestFlight makes provisioning much easier⌠no more UDIDs but there are some tradeoffs that directly affect the design of our CI workflow:
- All build numbers must be numbers⌠no letters. 885 is a valid build number, 885b is not and will be rejected.
- Two builds cannot be submitted with the same number, if you already submitted 885, you cannot replace it with a new build 885.
- Build numbers must increase for every build. You cannot submit build 900 after a build 920. You can also not submit build 900.1 after 902.
- Only the latest build is available to internal testers, there is no way to make older builds available to internal testers.
Because of these restrictions, the following "rules" apply to our builds:
- You should not deploy a new beta while a build is in regression testing, otherwise the testers may loose access to the build.
- Our build numbering scheme denotes a beta by with a "normal" build number: 885, 900, 1020.
- Our build numbering scheme denotes a release candidate with a decimal build number: 885.1, 900.1, 1020.1.
- Betas and releases with the same integer part, like 885 and 885.1, are identical except:
- They have different API Keys
- The Development menu is one visible in betas
- Assertions (crashes explicitly made by developers when the app is in an inconsistent state) are only enabled in betas