CI/CD¶
To automate as many tasks as possible, there are several CI/CD pipelines that handle various tasks, from building and testing the app to publishing app updates in the app stores.
Getting started¶
By default, all jobs are disabled so that you can decide for yourself which jobs you want to automate. Follow the steps below to configure the CI/CD pipelines:
- Add secrets: Before you can enable a job, you must add the necessary environment variables and environment secrets to the repository.
- Enable jobs: To enable a job, you must set the corresponding environment variable to
true
.
Now you can trigger the CI/CD pipeline (e. g. by pushing a commit) and the enabled jobs are executed.
Workflows¶
CI¶
The CI pipeline is executed on every push to the repository and is used to build and test the app.
flowchart LR
buildWeb(Build web assets)
buildAndroid(Build Android app)
buildIos(Build iOS app)
lint(Lint)
test(Test)
subgraph Parallel
direction TB
buildWeb
lint
test
end
Parallel --> buildAndroid
Parallel --> buildIos
Release¶
The Release pipeline is executed when a new version is created and is used to publish the app updates to Firebase Hosting and the app stores.
flowchart LR
buildWeb(Build web assets)
buildAndroid(Build Android app)
buildIos(Build iOS app)
deployWeb(Deploy web app)
deployAndroid(Deploy Android app)
deployIos(Deploy iOS app)
buildWeb --> deployWeb
buildWeb --> buildAndroid
buildWeb --> buildIos
buildAndroid --> deployAndroid
buildIos --> deployIos
Providers¶
The following providers are currently supported:
Environment variables¶
Variables are shown as plain text and are used for non-sensitive data. The following variables are available:
Name | Description | Default | Example |
---|---|---|---|
ENABLE_JOB_BUILD_WEB |
Enable the build of the web app. | false |
true |
ENABLE_JOB_BUILD_ANDROID |
Build the Android app. | false |
true |
ENABLE_JOB_BUILD_IOS |
Enable the build of the iOS app. | false |
true |
ENABLE_JOB_LINT |
Enable linting. | false |
true |
ENABLE_JOB_TEST |
Enable testing. | false |
true |
ENABLE_JOB_DEPLOY_WEB |
Enable deployment of the web app. | false |
true |
APPFLOW_APP_ID |
The Appflow app ID. | 1abc9c12 |
|
APPFLOW_ANDROID_BUILD_TYPE |
The build type for the Android app. | release |
|
APPFLOW_IOS_BUILD_TYPE |
The build type for the iOS app. | app-store |
Environment secrets¶
Secrets are encrypted and are used for sensitive data. The following secrets are available:
Name | Description |
---|---|
FIREBASE_SERVICE_ACCOUNT |
The Firebase service account key in JSON format. Open the Project settings in your Firebase project and navigate to the Service accounts tab. Click the Generate new private key button to download the service account key. Copy the content of the downloaded file and paste it as secret. |
IONIC_TOKEN |
The Ionic Cloud CLI token. See Authentication to learn how to create a token. |