Skip to main content

Unity Build Automation

In your Dashboard, navigate to DevOps > Build Automation > Configurations and create a new configuration.

In the advanced settings for your new configuration, you can set environment variables.

As an example, try setting the following environment variables:

VariableValue
UGS_CLI_PROJECT_IDyour-project-id
UGS_CLI_SERVICE_KEY_IDyour-service-key-id
UGS_CLI_SERVICE_SECRET_KEYyour-service-secret-key

In the repository you've configured for your services, create a new .sh file that will contain your UGS CLI commands. Then, in your new configuration's advanced settings, set a script hook with the name of the .sh file. There are two fields pre-build which lets you execute your file before building, or post-build which executes your file after building.

Example content for the .sh file:

#!/bin/bash
ugs --version
ugs config get environment
ugs status
ugs env list
ugs deploy <directory-with-service-configurations> -j