devdoe
devdoe

Reputation: 4325

Uploading iOS .ipa file to testflight via Jenkins

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?

Upvotes: 1

Views: 4746

Answers (2)

Priya Talreja
Priya Talreja

Reputation: 678

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

Upvotes: 3

m1sh0
m1sh0

Reputation: 2351

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

Upvotes: 7

Related Questions