Jenkins App Distribution, Automated on Every Run
Add AppShare as a stage in your Jenkinsfile for Jenkins app distribution that runs itself: any pipeline run that reaches it pushes a build, whether it’s triggered by a webhook, polling, or a manual run.
What You Get
Three Reasons Teams Automate This Step
Fits the Jenkinsfile You Already Have
Add one more stage to a pipeline you're already running, instead of adopting a separate tool just for distribution.
Runs on Infrastructure You Control
Jenkins runs wherever your team already hosts it, and the release stage runs on that same agent, no external service in between.
Every Branch, One Jenkinsfile
A Multibranch Pipeline job picks up the Jenkinsfile automatically, so the release stage applies to every branch that has one, not just main.
SETUP
Set Up Jenkins Mobile App Deployment in Four Steps
Add one stage that uploads every APK, or handles Jenkins IPA deployment, after each successful build.
Open your Jenkinsfile
Locate the Jenkinsfile checked into your repository root.
Store your API key in Credentials
In Manage Jenkins → Credentials, add your API key as Secret text.
Add the upload stage
Add the upload stage to run the CLI and deliver builds.
Save & let it run
Commit the Jenkinsfile to trigger automated releases.
Open your Jenkinsfile
Open the Jenkinsfile at your project root.
Jenkinsfile
pipeline {
agent any
stages {
// Existing build and test stages
}
}Store your API key in Credentials
In Jenkins, navigate to Manage Jenkins → Credentials and add a Secret text credential with ID APPSHARE_API_KEY.
Jenkins Credentials
Kind: Secret text
ID: APPSHARE_API_KEY
Secret:Add the upload stage
Add a new stage to your Jenkins pipeline that installs the CLI and pushes the build artifact.
Jenkinsfile
stage('Upload to AppShare') {
environment {
APPSHARE_API_KEY = credentials('APPSHARE_API_KEY')
}
steps {
sh '''
npm install -g zunoy-appshare-cli
appshare ./build/app-release.apk --app-id my-app-slug
'''
}
}Save & let it run
Commit your Jenkinsfile. The next pipeline run will build and distribute your mobile app automatically.
Terminal
git add Jenkinsfile
git commit -m "ci: add AppShare stage to Jenkinsfile"
git push origin mainLIFECYCLE
What Actually Happens on a Run
UNDER THE HOOD
Jenkins Just Runs the CLI
Installing the CLI and pushing the build is just AppShare CLI, running inside Jenkins instead of your terminal.

NOT JUST JENKINS
AppShare Works With Your Pipeline Too
FAQ
Questions About the Jenkins Integration
What is Jenkins app distribution?
Jenkins app distribution means sending every Android or iOS build your Jenkins pipeline produces straight to testers. With AppShare, one extra stage in your Jenkinsfile installs the AppShare CLI and uploads the .apk or .ipa after the build stage succeeds. Testers get an install link and QR code without anyone uploading the build by hand.
How does Jenkins iOS deployment work for IPA builds?
Jenkins IPA deployment needs a macOS agent with Xcode to build and sign the .ipa, selected with an agent label in that stage. If the upload stage runs on a different agent, stash the .ipa after the build and unstash it before uploading. Ad hoc builds only install on registered UDIDs, so add tester devices in AppShare first.
What triggers the pipeline?
Whatever already starts your pipeline: a webhook from your Git provider, Jenkins polling for changes, or a manual run. The AppShare stage runs whenever the pipeline reaches it. To release only from certain branches, wrap the stage in a when condition, such as branch main, so feature branches still build and test without uploading anything.
How do I set up Jenkins mobile app deployment with AppShare?
Open the Jenkinsfile in your repository and add an upload stage inside stages, after your build stage. It runs as a standard sh step, so no Jenkins plugin is needed, only Node.js on the agent for the CLI. In a Multibranch Pipeline job, the stage applies automatically to every branch whose Jenkinsfile includes it.
How do I keep my API key out of the Jenkinsfile?
Store it in Manage Jenkins, Credentials as a Secret text entry, then bind it with the credentials() helper inside your pipeline’s environment block. Jenkins masks the value in console output, so the key never appears in your Jenkinsfile, your repository, or your build logs, and the AppShare CLI reads it at runtime.
Can I add release notes automatically?
Not from the pipeline yet. The AppShare CLI uploads the build (appshare <file> --app-id <slug>) and has no release notes flag. Once the upload finishes, add or edit the notes on the release's Release Notes tab in AppShare, and testers see them on the install page.
Get Started
Add It to Your Next Pipeline Run
Add the stage, store your API key, and the next pipeline run does the rest.
No plugin required
Runs on your own infrastructure
Fits any Multibranch Pipeline