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:
Variable | Value |
---|---|
UGS_CLI_PROJECT_ID | your-project-id |
UGS_CLI_SERVICE_KEY_ID | your-service-key-id |
UGS_CLI_SERVICE_SECRET_KEY | your-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