Uploading iOS .ipa file to testflight via Jenkins

折月煮酒 提交于 2019-12-25 00:15:59

问题


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:

  1. 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.
  2. 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.
  3. Via Shenzen: This is deprecated. On the Github page itself, they have mentioned to use Fastlane.
  4. 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

  1. 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
  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!