Uploading .ipa to testflight via jenkins

2020-07-27 04:20发布

问题:

I am using jenkins for auto build and auto deploy. Till now I successfully achieved build generation (i.e .ipa file). I also achieved diawi link generation.

Now I want to upload .ipa to testflight via jenkins. Right now I am using this script for uplaod,

 ipa distribute:itunesconnect \
 —-file "${WORKSPACE}/build/upload.ipa" \
 —-account yourappleid@gmail.com \
 -p Y0urPa55w0rd \
 —-apple-id 1234567890 —-upload —-verbose

but jenkins gives me error given below,

*** Error: Unable to validate your application. Unable to read password from stdin.

What's wrong in this script OR any other script will be used for upload. So, please anyone can help me to upload an .ipa to testflight via jenkins.

回答1:

I am done it. Successfully upload an .ipa to testflight via jenkins.

ALTOOL is a command line tool that helps you to upload an .ipa to testflight. You just need to go to the path of altool (xcode inbuilt tool) of your xcode, and then fire a command for uploading an .ipa to testflight.

Below is the script/command that you need to write in Execute Shell of Build phase.

cd  /Applications/Xcode\ 8.3.3/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Versions/A/Support/

./altool --upload-app -f /Users/Shared/Jenkins/Home/workspace/yourWorkspace-name/build/artifacts/yourIPA.ipa -u itunesconnectUserName -p itunesconnectPassword