💡
BETA mode. Your feedback is highly appreciated!

Build and upload both your Android (APK) & iOS (IPA) to notify your testers for testing and feedback using Jenkins Freestyle Project & Pipeline

Install Jenkins with docker

Assuming docker is installed. Use the following command to start the Jenkins server.

docker run -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home --name jenkins jenkins/jenkins:lts-jdk11

Open http://localhost:8080 and get the credentials from the log:

docker logs jenkins

Follow the instructions to complete the setup.

Setup the Jenkins job

Depending on how you use Jenkins, please choose one of the two options to upload your package.

Option 1: Freestyle Project

  1. Create a Freestyle Project job, please DO NOT have blank in the name, let's say upload-mobile-package
  2. Add parameters to the job as below tables shown
Parameter Type Parameter Name Default Value Description
String Parameter api_token You can get it from https://portal.testapp.io/settings/api-credentials
String Parameter app_id You can get it from your app page at https://portal.testapp.io/apps
Choice Parameter release It can be either both or android or ios
String Parameter apk /user/path/to/app.apk (if you select release both or android)
String Parameter ipa /user/path/to/app.ipa (if you select release both or ios)
String Parameter release_notes Manually add the release notes to be displayed for the testers
Boolean Parameter notify Send notifications to your team members about this release

Check TA-CLI for more info

  1. Add a Execute Shell build step, and paste the following code
export INSTALL_DIR=${WORKSPACE}
if [ ! -f ${INSTALL_DIR}/ta-cli ]
then
	curl -Ls https://github.com/testappio/cli/releases/latest/download/install | bash
fi
export PATH=$INSTALL_DIR:$PATH
chmod 0755 $INSTALL_DIR/ta-cli

ta-cli publish --api_token=$api_token --app_id=$app_id --release=$release --apk=$apk --ipa=$ipa --release_notes="$release_notes" --notify=$notify
  1. Integrate with existing Jenkins CI process

Call this job from other jobs which build the APK/IPA packages.

Option 2: pipeline (Jenkinsfile)

Please add the below stage to your pipeline script after the build stage.

node {
    stage('Upload to TestApp.io') {
        api_token = 'Your API Token'
        app_id = 'Your App ID'
        release = 'both'
        apk = '/tmp/data/sample-app.apk'  // /user/path/to/app.apk (if you select release both or android)
        ipa = '/tmp/data/sample-app.ipa' // /user/path/to/app.ipa (if you select release both or ios)
        release_notes = "My release notes..."
        notify = false

        // Install ta-cli
        sh '''
            export INSTALL_DIR=$WORKSPACE
            if [ ! -f $INSTALL_DIR/ta-cli ]
            then
                curl -Ls https://github.com/testappio/cli/releases/latest/download/install | bash
            fi
        '''
        // do the job now
        sh "./ta-cli publish --api_token=$api_token --app_id=$app_id --release=$release --apk=$apk --ipa=$ipa --release_notes=$release_notes --notify=$notify"

    }
}

Feedback & Support

Developers built TestApp.io to solve the pain of app distribution for mobile app development teams.

Join our Slack channel for feedback and support.

Happy releasing 🎉