Skip to main content

ionic-cloud build web

[ionic-cloud, build, web]

This command creates a web build on Appflow. While the build is running, it prints the remote build log to the terminal.

ionic-cloud build web [flags]

Examples

ionic-cloud build web --app-id=a1234bc --commit=a9eb85e
ionic-cloud build web --app-id=a1234bc --commit=a9eb85e --web-preview
ionic-cloud build web --app-id=a1234bc --commit=a9eb85e --webhook-url="http://webhook.com/test"
ionic-cloud build web-preview --app-id=b3456cd --commit=4c511f1 --environment="My Custom Environment Name"

Aliases

  • "live-update"
  • "web-preview"

Flags

NameTypeDefaultDescription
--app-id [required]stringAppflow app id
--build-stackstringTarget platform ("Linux - 2023.10" / "Linux - 2023.06" / "Linux - 2023.04" / "Linux - 2022.10" / "Linux - 2022.07"), defaults to latest stack
--commitstringCommit sha
--dependency-cachingbooleanfalseEnabled NPM caching
--detachedbooleanfalseAsynchronously run appflow build
--envstring[][]Variables to expose to your build. Variables defined this way override those loaded using the env-file flag. Example: --env VAR=value
--env-filestring[][]Files declaring environment variables to expose to your build. Variables from later files overwrite variables from earlier files.
--environmentstringThe name of the predefined Appflow Environment to expose to your build
--secretstring[][]Secrets to expose to your build. Example: --secret VAR=value
--web-previewbooleanfalseEnable web preview
--webhook-urlstringSchedules a webhook that executes after the build finishes. The payload will include a URL for downloading build artifacts if the build succeeds.
--zipbooleanfalseDownload zip file
--zip-namestringDownload zip and rename file. Example: myapp.zip

Global Flags

NameTypeDefaultDescription
-h, --helpbooleanfalsePrint help information for command
--configstringIonic Cloud config file (.ionic-cloud.yaml by default)
--jsonbooleanfalseFor commands with output, shortcut to print as JSON
--outputstring"text"For commands with output, print as [json] or human readable [text]
--tokenstringIonic authorization token

Outputs

NameTypeDescription
appIdstringYour app's unique identifier in Appflow.
buildId (optional)numberA unique identifier for a build done in Appflow.
buildNumber (optional)numberAn 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.
commitstringThe commit hash.
buildStackobjectA Build Stack in Appflow.
.namestringThe friendly name for a Build Stack in Appflow.
.dependencies (optional)object[]The list of pinned software versions for a Build Stack in Appflow.
.namestringThe name of a software used by a Build Stack in Appflow.
.versionstringThe pinned version of a software used by a Build Stack in Appflow.
environment (optional)objectThe Environment for your build in Appflow.
.namestringThe 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)booleanWhether or not dependency caching was enabled for this build.
webhooks (optional)object[]List of associated webhooks.
.urlstringThe URL of the associated webhook.
.statusgenerated.BuildNotificationStatusThe status of the associated webhook.
webPreviewbooleanWhether the Web Build was created with an app preview on the Appflow Dashboard.
webPreviewUrl (optional)stringThe URL to visit to see your app preview, available on the Appflow Dashboard.
devicePreviewUrl (optional)stringThe shareable URL to visit to see your app preview, available on the Appflow Dashboard.
androidMin (optional)stringThe Native Binary version that is the minimum required in order to use this Live Update.
androidMax (optional)stringThe Native Binary version that is the maximum still allowed to use this Live Update.
androidEq (optional)stringThe Native Binary version that should be considered equivalent and ignore this Live Update.
iosMin (optional)stringThe Native Binary version that is the minimum required in order to use this Live Update.
iosMax (optional)stringThe Native Binary version that is the maximum still allowed to use this Live Update.
iosEq (optional)stringThe 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"
}