问题
I might be late to the CI/CD party but better late than never. So far, I am able to setup Jenkins on a separate MAC which does not contain XCode. I use this MAC as a 24x7 small server for minor operations. A lot of time was wasted for archiving and then uploading that build to testflight for my iOS apps so I thought of setting up a CI/CD process.
After the Jenkins setup, I am able to generate the .ipa file for specified target (release/debug).
Now I want to upload this .ipa file to Testflight. This is what I know already:
- Via ALTool: As per this answer, I should use AlTool. AlTool is nothing but the Application Loader inside XCode. I don't want to install XCode on this separate MAC, so this is not what I can work with.
- Via shell script: If you see the question of the answer in the above point, the user has mentioned a script. I have tried that as well and it fails.
- Via Shenzen: This is deprecated. On the Github page itself, they have mentioned to use Fastlane.
- Via Testflight plugin: This is also deprecated.
So basically, what I feel is Jenkins alone itself can not distribute iOS builds to testflight, unless we use ALTool which requires XCode to be installed. Is there a workaround to do it purely via Jenkins?
回答1:
Yes, there is a better option, strongly recommend Fastlane.
You can check here and here is specifically for TestFlight
You need to have Fastlane on the Jenkins but it is execution is easy and fast.
Also as we discussed you can implement connection by yourself using AppStoreConnect API
回答2:
Fastlane Pilot action is a better option.
You need to add Environment Variables in Jenkins
- FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD - This is application-specific password generated on https://appleid.apple.com. Pilot automatically fetches password for a transporter from environment variable named
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD
- FASTLANE_PASSWORD This is apple developer account password
Add below command in shell script of Jenkins
fastlane pilot upload — ipa IPA_PATH
Reference link
来源:https://stackoverflow.com/questions/57289366/uploading-ios-ipa-file-to-testflight-via-jenkins