Using Appflow in Jenkins, GitLab CI, & GitHub Actions
For those who already use a CI/CD system like Jenkins, GitLab CI, & GitHub Actions you can easily integrate Appflow with those systems to do both live updates from them as well as native binary builds. Triggering native builds in particular can save you the headache of having to appropriately configure the OS, Xcode version, credentials, etc. Simply specify the configurations you'd like to use & let Appflow do the heavy lifting.
note
Building your native binaries in the cloud with Appflow requires a subscription to the Launch plan and above. Jenkins & GitLab CI integrations using the CLI is only available for the Scale plan. Our official GitHub Action is available free! 🚀 Sign up here.
#
GitHub ActionsAppflow has it's very own GitHub Action that you can use to trigger builds. When you use the action you native binaries can be uploaded to GitHub as build artifacts so that you can easily access them. Since Appflow does the builds you don't need to run builds on any particular OS so don't worry about setting up & configure MacOS & codesigning Appflow can take care of that for you. You can read more about the action see the docs here.
The following is a sample github-workflow.yml
file that will build iOS, Android, & Live Updates:
note
Remember to get your appflow token and set it using GitHub Secrets.
#
JenkinsYou can use the Ionic CLI to trigger builds from Jenkins as well. This can help save time having to setup agents on multiple OSs & managing dependencies.
The Jenkinsfile
below uses the Ionic CLI Docker Image as the container to run builds in. The container can run anywhere docker can run.
The following is a sample Jenkinsfile
file that will build iOS, Android, & Live Updates:
note
Remember to get your appflow token and set it using Jenkins Credentials & load it into the IONIC_TOKEN
environment variable.
#
GitLab CIYou can use the Ionic CLI to trigger builds from GitLab CI as well. This can help save time having to setup GitLab Runners on multiple OSs & managing dependencies.
The .gitlab-ci.yml
below uses the Ionic CLI Docker Image as the container to run builds in. The container can run anywhere docker can run.
The following is a sample .gitlab-ci.yml
file that will build iOS, Android, & Live Updates:
note
Remember to get your appflow token and set it using GitLab variables as IONIC_TOKEN
variable.
#
Getting an Appflow TokenYou will need a token to authenticate with Appflow from your CI/CD System. The easiest way to get your token is to use the Ionic CLI to login & retrieve the token.
To login type:
Then you can use the following command to see your token:
When using the Ionic CLI you can login then using the token as an environment variable by setting it in you CI/CD system.