appflow build web
This command creates a web build on Appflow. While the build is running, it prints the remote build log to the terminal.
appflow build web [flags]
Examples
appflow build web --app-id=a1234bc --commit=a9eb85e
appflow build web --app-id=a1234bc --commit=a9eb85e --web-preview
appflow build web --app-id=a1234bc --commit=a9eb85e --webhook-url="http://webhook.com/test"
appflow build web-preview --app-id=b3456cd --commit=4c511f1 --environment="My Custom Environment Name"
Aliases
- "live-update"
- "web-preview"
Flags
Name | Type | Default | Description |
---|---|---|---|
--app-id [required] | string | Appflow app id | |
--build-stack | string | Target platform ("Linux - 2023.10" / "Linux - 2024.10" / "Linux - 2024.06" / "Linux - 2023.06" / "Linux - 2023.04"), defaults to latest stack | |
--commit | string | Commit sha | |
--dependency-caching | boolean | false | Enabled NPM caching |
--detached | boolean | false | Asynchronously run appflow build |
--env | string[] | [] | Variables to expose to your build. Variables defined this way override those loaded using the env-file flag. Example: --env VAR=value |
--env-file | string[] | [] | Files declaring environment variables to expose to your build. Variables from later files overwrite variables from earlier files. |
--environment | string | The name of the predefined Appflow Environment to expose to your build | |
--secret | string[] | [] | Secrets to expose to your build. Example: --secret VAR=value |
--web-preview | boolean | false | Enable web preview |
--webhook-url | string | Schedules a webhook that executes after the build finishes. The payload will include a URL for downloading build artifacts if the build succeeds. | |
--zip | boolean | false | Download zip file |
--zip-name | string | Download zip and rename file. Example: myapp.zip |
Global Flags
Name | Type | Default | Description |
---|---|---|---|
-h, --help | boolean | false | Print help information for command |
--config | string | Appflow config file (.appflow.yaml by default) | |
--json | boolean | false | For commands with output, shortcut to print as JSON |
--output | string | "text" | For commands with output, print as [json] or human readable [text] |
--token | string | Ionic authorization token |
Outputs
Name | Type | Description |
---|---|---|
appId | string | Your app's unique identifier in Appflow. |
buildId (optional) | number | A unique identifier for a build done in Appflow. |
buildNumber (optional) | number | An app-specific build number for builds done in Appflow. |
buildStatus | "CREATED" | "PENDING" | "RUNNING" | "BUILDING" | "FAILED" | "SUCCESS" | "CANCELED" | The current state of your build in Appflow. |
platform | "ANDROID" | "IOS" | "WEB" | The ecosystem you are building for. |
commit | string | The commit hash. |
buildStack | object | A Build Stack in Appflow. |
.name | string | The friendly name for a Build Stack in Appflow. |
.dependencies (optional) | object[] | The list of pinned software versions for a Build Stack in Appflow. |
.name | string | The name of a software used by a Build Stack in Appflow. |
.version | string | The pinned version of a software used by a Build Stack in Appflow. |
environment (optional) | object | The Environment for your build in Appflow. |
.name | string | The name of an Environment you've created in Appflow. |
.files (optional) | string[] | The list of local environment files provided to this command. |
.variables (optional) | { "string": string, ... } | The combined list of all environment variables used for a build. |
.secrets (optional) | { "string": string, ... } | The combined list of all environment secrets used for a build. The key values are not downloaded; the key names are just displayed for reference. |
artifacts (optional) | { "APK": string, ... } | All artifacts that were saved by Appflow during a build, and are available for download. |
dependencyCaching (optional) | boolean | Whether or not dependency caching was enabled for this build. |
webhooks (optional) | object[] | List of associated webhooks. |
.url | string | The URL of the associated webhook. |
.status | generated.BuildNotificationStatus | The status of the associated webhook. |
webPreview | boolean | Whether the Web Build was created with an app preview on the Appflow Dashboard. |
webPreviewUrl (optional) | string | The URL to visit to see your app preview, available on the Appflow Dashboard. |
devicePreviewUrl (optional) | string | The shareable URL to visit to see your app preview, available on the Appflow Dashboard. |
androidMin (optional) | string | The Native Binary version that is the minimum required in order to use this Live Update. |
androidMax (optional) | string | The Native Binary version that is the maximum still allowed to use this Live Update. |
androidEq (optional) | string | The Native Binary version that should be considered equivalent and ignore this Live Update. |
iosMin (optional) | string | The Native Binary version that is the minimum required in order to use this Live Update. |
iosMax (optional) | string | The Native Binary version that is the maximum still allowed to use this Live Update. |
iosEq (optional) | string | The Native Binary version that should be considered equivalent and ignore this Live Update. |
Successful Output
{
"appId": "052b32ac",
"buildId": 6010455,
"buildNumber": 25,
"buildStatus": "SUCCESS",
"platform": "WEB",
"commit": "cef1sdca",
"buildStack": {
"name": "Linux - 2022.10",
"dependencies": [
{
"name": "Cordova CLI",
"version": "11.0.0"
},
{
"name": "Ionic CLI",
"version": "6.20.3"
},
{
"name": "Node.js",
"version": "18.12.1"
},
{
"name": "Node.js versions",
"version": "14.21.1 / 16.18.1 / 18.12.1"
},
{
"name": "npm",
"version": "8.19.3"
},
{
"name": "Yarn",
"version": "1.22.19"
},
{
"name": "Python",
"version": "3"
},
{
"name": "Debian",
"version": "11.4"
},
{
"name": "Gradle",
"version": "5.6.4"
},
{
"name": "OpenJDK",
"version": "1.8.0_332 / 11.0.16"
},
{
"name": "Android SDK",
"version": "27-33"
}
]
},
"environment": {
"name": "Test Environment",
"files": [
".env-file1",
".env-file2"
],
"variables": {
"Var1": "value1",
"Var2": "value2"
},
"secrets": {
"Sec1": "********",
"Sec2": "********"
}
},
"artifacts": {
"WWW_ZIP": "0e949006-65e4-4f22-8579-7fa8cf7b11c0.zip"
},
"dependencyCaching": null,
"webhooks": null,
"webPreview": true,
"webPreviewUrl": "https://dashboard.ionicframework.com/preview/052b32ac/aq5v80ak38",
"devicePreviewUrl": "https://aq5v80ak38.appflowapp.com",
"androidMin": "1.0.0",
"androidMax": "1.3.0",
"androidEq": "1.2.3",
"iosMin": "1.0.0",
"iosMax": "1.3.0",
"iosEq": "1.2.3"
}
Detached Output
{
"appId": "052b32ac",
"buildId": 6010455,
"buildNumber": 25,
"buildStatus": "CREATED",
"platform": "WEB",
"commit": "cef1sdca",
"buildStack": {
"name": "Linux - 2022.10",
"dependencies": [
{
"name": "Cordova CLI",
"version": "11.0.0"
},
{
"name": "Ionic CLI",
"version": "6.20.3"
},
{
"name": "Node.js",
"version": "18.12.1"
},
{
"name": "Node.js versions",
"version": "14.21.1 / 16.18.1 / 18.12.1"
},
{
"name": "npm",
"version": "8.19.3"
},
{
"name": "Yarn",
"version": "1.22.19"
},
{
"name": "Python",
"version": "3"
},
{
"name": "Debian",
"version": "11.4"
},
{
"name": "Gradle",
"version": "5.6.4"
},
{
"name": "OpenJDK",
"version": "1.8.0_332 / 11.0.16"
},
{
"name": "Android SDK",
"version": "27-33"
}
]
},
"environment": {
"name": "Test Environment",
"files": [
".env-file1",
".env-file2"
],
"variables": {
"Var1": "value1",
"Var2": "value2"
},
"secrets": {
"Sec1": "********",
"Sec2": "********"
}
},
"artifacts": {},
"dependencyCaching": null,
"webhooks": null,
"webPreview": true,
"webPreviewUrl": "https://dashboard.ionicframework.com/preview/052b32ac/aq5v80ak38",
"devicePreviewUrl": "https://aq5v80ak38.appflowapp.com",
"androidMin": "1.0.0",
"androidMax": "1.3.0",
"androidEq": "1.2.3",
"iosMin": "1.0.0",
"iosMax": "1.3.0",
"iosEq": "1.2.3"
}