Unreal Engine Steam deployment with Docker and TeamCity
Use the cm2network/steampipe:contentbuilder image to send content to Steam
Wed, 02 Aug 2023
I finally figured out how to use the Steam content builder inside of a docker container! This is all thanks to cm2network.
- Follow the Setup instructions on the the image docs
- Setup the following environment variables in your template
These have to be environment variables and NOT configuration variables
<param name="env.STEAMAPPBRANCH" value="beta" />
<param name="env.STEAMAPPBUILDESC" value="CI Build - %build.number%" />
<param name="env.STEAMAPPID" value="" />
<param name="env.STEAMDEPOTID" value="" />
<param name="env.STEAMPASSWORD" value="" />
<param name="env.STEAMUSER" value="" />
You should have all of these variables already, I’m not going to go over setting up a Steam depot for deploying content to.
- This variable is a configuration variable
steamcmd_cache_volume // where you content gets cached at. This cache is option but it speeds up builds quite a bit
- Once you have all the variables set up just run the container cm2network/steampipe:contentbuilder with the script /home/steam/entry.sh
The full build config in code
<?xml version="1.0" encoding="UTF-8"?>
<template xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" uuid="7f6216ac-59a1-45b3-a397-412c731968d0" xsi:noNamespaceSchemaLocation="https://www.jetbrains.com/teamcity/schemas/2021.1/project-config.xsd">
<name>Steam Content Builder</name>
<settings>
<options>
<option name="buildNumberPattern" value="%version_name%.%build.counter%" />
</options>
<parameters>
<param name="env.STEAMAPPBRANCH" value="beta" />
<param name="env.STEAMAPPBUILDESC" value="CI Build - %build.number%" />
<param name="env.STEAMAPPID" value="" />
<param name="env.STEAMDEPOTID" value="" />
<param name="env.STEAMPASSWORD" value="" />
<param name="env.STEAMUSER" value="" />
</parameters>
<build-runners>
<runner id="RUNNER_6" name="Deploy To Steam" type="simpleRunner">
<parameters>
<param name="plugin.docker.imageId" value="cm2network/steampipe:contentbuilder" />
<param name="plugin.docker.imagePlatform" value="linux" />
<param name="plugin.docker.pull.enabled" value="true" />
<param name="plugin.docker.run.parameters" value="-v %system.teamcity.build.tempDir%:/home/steam/steamsdk/sdk/tools/ContentBuilder/content -v steamcmd_login_volume:/home/steam/Steam:z -v %steamcmd_cache_volume%:/home/steam/steamsdk/sdk/tools/ContentBuilder/output" />
<param name="script.content" value="/home/steam/entry.sh" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
</runner>
</build-runners>
<vcs-settings />
<requirements />
<build-triggers />
<build-extensions>
<extension id="perfmon" type="perfmon">
<parameters />
</extension>
<extension id="DockerSupport" type="DockerSupport">
<parameters>
<param name="login2registry" value="PROJECT_EXT_3" />
<param name="loginCheckbox" value="on" />
</parameters>
</extension>
</build-extensions>
<cleanup />
</settings>
</template>