This feature is only available on our Standard or Enterprise plans. Please contact us to enable this feature.
The Ionic Cloud CLI has to be authenticated on Appflow to be able to trigger a Package build.
To log in, create a Personal Access Token on the Appflow Dashboard.
$ export IONIC_TOKEN=<your personal access token>
Trigger a native build
Assuming the CLI is authenticated, to trigger a native build, run:
$ ionic-cloud build <ios|android> <build_type> --app-id=<APPFLOW APP ID> --commit=<GIT COMMIT SHA> --signing-cert="My Signing Certificate"
Build type can be
enterprise for iOS and
release for Android.
Signing cert is required for all build types except
debug on Android. For information on setting up signing certificates, see here.
Once the build is successfully triggered, the CLI will automatically start tailing the logs from Appflow.
Customize the package build with Options
The Options available to customize the build include:
--env=<name>Specify ad-hoc environment variables. You can use the flag any number of times to specify as many environment variables.
--env-file=<name>You can specify a file with any number of environment variables (one on each line).
--environment=<name>to specify the group of environment variables to be exposed to the build (available only with Automation; more info about environments are available here)
--native-config=<name>to specify the group of native config variables to be exposed to your build (more info about native configs are available here)
Customize the package build with Advanced Options
The Advanced Options available to customize the build include:
--build-stack=<name>This option is mostly useful for iOS builds if for any reason a package build with a specific version of Xcode is needed. If this is omitted, the preferred version is used.
--apkDownload Android APK artifact
--aabDownload Android AAB artifact
--ipaDownload iOS IPA artifact
--dsymDownload iOS DSYM artifact
--apk-name=<name>To override the Android apk downloaded file name
--aab-name=<name>To override the Android aab downloaded file
--ipa-name=<name>To override the iOS ipa downloaded file
--dsym-name=<name>To override the iOS dsym downloaded file
Note about referencing Options values by name
Names are case-sensitive and need to be specified including spaces, for instance:
$ ionic-cloud build ios development --app-id=123 --commit=456 --signing-cert="iOS Dev"
Apart from the
--commit option, all others require the full name setup within the Appflow Dashboard.
Look for the name on the signing certificate, Environments and Native Configs pages in Appflow:
For the build stack, use one of the strings identifying the platform in the Appflow Package Build form: