Skip to content

Environments

Environment variables allow you to customize your native builds by providing configuration values, secrets, and other data that can be accessed during the build process. Capawesome Cloud provides several types of environment variables to support different use cases.

Default Environment

The following environment variables are automatically set by Capawesome Cloud for every build. These variables provide information about the build context and cannot be overridden.

Name Type Description
CI boolean Indicates the build is running in a CI environment (always true).
CI_APP_ID string The ID of the application.
CI_BUILD_ID string Unique identifier for the build.
CI_BUILD_NUMBER string Sequential number of the build.
CI_GIT_COMMIT_SHA string The SHA hash of the Git commit.
CI_GIT_COMMIT_MESSAGE string The commit message of the Git commit.
CI_GIT_REFERENCE string The Git branch or tag name.
CI_PLATFORM string The target platform (ios or android).

You can use these default environment variables in your build scripts to access information about the build context and make decisions based on that data.

Reserved Environment

The following environment variables are reserved for platform-specific build configuration. These variables can be set by you to customize the build process.

Name Type Description
ANDROID_BUILD_TYPE string The Android build type.
ANDROID_FLAVOR string The Android product flavor.
IOS_SCHEME string The iOS scheme name.
NODE_VERSION int The Node.js version (must be the major version number such as 22 or 24).
JAVA_VERSION int The Java version (must be the major version number such as 17 or 21).
XCODE_VERSION int The Xcode version (must be the major version number such as 16 or 26).

For example, you can set the JAVA_VERSION variable to 17 to use Java 17 for your Android builds, or set the IOS_SCHEME variable to specify a custom scheme for your iOS builds.

Build Stack

The available build stacks and their supported versions for Node.js, Java, and Xcode can be found in the Build Stacks documentation.

Custom Environments

Custom environments allow you to define sets of environment variables for different build scenarios. For example, you can create separate environments for development, staging, and production builds, each with their own configuration values.

To create a custom environment, navigate to the Environments page in the Capawesome Cloud Console and define your environment variables. You can then select which environment to use when triggering a build.

Secrets

Secrets are encrypted environment variables that are used to store sensitive information such as API keys, certificates, and passwords. Unlike regular environment variables, secrets are encrypted at rest and in transit, and their values are never displayed in build logs.

Add Secret

To add a secret, navigate to the Environments page in the Capawesome Cloud Console, click on "Manage Secrets" in the "Actions" menu of an environment, and create a new secret. Secrets can be accessed in your build scripts using standard environment variable syntax, just like regular variables.

Delete Secret

To delete a secret, navigate to the Environments page in the Capawesome Cloud Console, click on "Manage Secrets" in the "Actions" menu of an environment. From there, click on "Delete" in the "Actions" menu of the secret you wish to delete, and confirm the deletion.

Variables

Variables are regular environment variables that can be used to store non-sensitive configuration values. Variables are useful for storing values that may change between builds or environments, such as API endpoints, feature flags, or version numbers.

Add Variable

To add a variable, navigate to the Environments page in the Capawesome Cloud Console, click on "Manage Variables" in the "Actions" menu of an environment, and create a new variable. Variables can be accessed in your build scripts using standard environment variable syntax.

Delete Variable

To delete a variable, navigate to the Environments page in the Capawesome Cloud Console, click on "Manage Variables" in the "Actions" menu of an environment. From there, click on "Delete" in the "Actions" menu of the variable you wish to delete, and confirm the deletion.