SubmitTool distribution

My team wishes to explore use of the Unreal SubmitTool, but has questions:

  1. How does Epic distrubute the tool? Is it done through UGS tool distribution? Is SubmitTool installed using a package? Is SubmitTool added to the project and built with the engine? Do you have any recommendations for how to do this such that projects with different Perforce branches can modify the SubmitTool.ini?
  2. How would you recommend integrating the SubmitTool with the editor such that users can submit from within the Unreal game editor?
  3. What is the intended functionality of the Jira integration? Since our organization doesn’t use Jira Service Desk API, I’ve not been able to determine what the Jira button does.

Thank you!

Building SubmitTool

There are multiple ways to build it, you can build the tool using the .sln or package the program as a standalone version that can be distributed as you want. To package the program you can use UAT BuildCookRun.

At Epic Games we use Horde to build it via BuildGraph.

Distributing SubmitTool

We have two locations users can download SubmitTool from: Via UGS as a Custom Tool (for most users) or via the Horde Tools page (for advanced users/Mac/Linux, or anyone needing manual distribution).

After you’ve set up SubmitTool as a custom tool in UGS, you can open UGS, click “Options” at the bottom right, “Application Settings”, and check the “Submit Tool” checkbox. This will add SubmitTool as an option to your P4V client.

UGS Custom Tools configured via UGS

UGS can be configured to handle the installation of custom tools.

You configure UGS to scan a P4 path for tools and their updates by providing it with a P4 depot path in UGS’ Deployment.json file:

{ [...] "toolsDepotPath": "//depot/InternalTools/UnrealGameSync/bin/Tools", }It will look for .ini files and then a corresponding zip file name following this directory structure:

ToolDepotFolder/ToolName/ToolName.ini

ToolDepotFolder/ToolName/ToolName.zip

To update a tool, simply commit a new version of its zip file. UGS will automatically update the tool if it finds a newer version in Perforce. It polls periodically.

The Custom Tool’s .ini file contains its ID, name, description, and optionally, its installation and uninstallation steps.

See how the .ini file gets read in ToolUpdateMonitor.ParseToolInfo(..).

We provide a PowerShell script for installing SubmitTool to P4V which you can find at https://github.com/EpicGames/UnrealEngine/blob/ue5-main/Engine/Programs/SubmitTool/Build/Win64/InstallSubmitTool.ps1.

That Build folder also contains installation scripts for Mac and Linux.

Here’s an example SubmitTool.ini:

[Settings] Id=cc165d7a-8ed8-4d0f-9b99-072e94b913ef Name=SubmitTool Description=Submit Tool InstallCommand=InstallSubmitTool.ps1Here is an example BuildGraph file that compiles SubmitTool, submits it to a P4 depot for UGS to find, and also publishes it as a Horde tool: https://dev.epicgames.com/community/snippets/wQ2g/unreal-engine-submittool-buildgraph-example.

Configuring SubmitTool

The base engine SubmitTool settings are in WorkspaceFolder/Engine/Programs/SubmitTool/Config/SubmitTool.ini.

Each project can override it in WorkspaceFolder/ProjectName/Config/SubmitTool.ini.

For the parameters you can set, see Engine/Source/Programs/SubmitTool/Private/Parameters/SubmitToolParameters.h.

Submit tool config works in override layers on a property-by-property basis. You can check the override hierarchy in the SubmitToolParametersBuilder.cpp constructor.

As a non-exhaustive summary:

  • Load internal .ini packaged with SubmitTool
  • Load .ini in the root directory that we’re running
  • Scan the top-level folders for .uprojects and a Config/SubmitTool.ini next to them
  • Load up a user-level override in %LOCALAPPDATA%/SubmitTool/SubmitTool.ini

Each config location has a later specific override for each platform (WindowsSubmitTool.ini, MacSubmitTool.ini, LinuxSubmitTool.ini)

Integrating it - Into P4V

After installing Submit Tool through UnrealGameSync, it can be run from P4V via Tools > SubmitTool, or by right-clicking on the changelist and selecting “SubmitTool” from the menu.

Integrating it - Into Unreal Editor

We have recently made a plugin available called SubmitToolEditor, see here: https://github.com/EpicGames/UnrealEngine/tree/ue5-main/Engine/Plugins/Experimental/SubmitToolEditor.

Enabling this plugin will allow projects to override the submit flow and call an exe/args to allow submission to be handled externally.

This is what our config section looks like in DefaultEditor.ini. It requires the SubmitTool to be installed in a predefined place for anyone trying to submit using the editor, using UGS here has that advantage over other distribution methods.

[/Script/SubmitToolEditor.SubmitToolEditorSettings] SubmitToolPath=$(LocalAppData)/UnrealGameSync/Tools/SubmitTool/Current/Windows/Engine/Binaries/Win64/SubmitTool.exe SubmitToolArguments=-server $(Port) -user $(User) -client $(Client) -cl $(Changelist) -root-dir \\\"$(RootDir)\\\" bSubmitToolEnabled=True bEnforceDataValidation=TrueJira Integration

The Jira button integrates with Jira, authenticating and fetching tickets assigned to the user and allowing you to easily add the ID as a tag. If you don’t use Jira in your organization you won’t have any need for that tag.

[Image Removed]

Hey Ari!

Thanks for your details on how to deploy tools hosted on P4!

Internally at Epic, do you host the tool on P4 or on Horde?

UGS is capable of querying both (through ReadPerforceToolsAsync and ReadHordeToolsAsync).

If you host the tool on Horde, could you give us details on you set this up?

We mainly host them on P4.

The feature allowing UGS to download tools from Horde is only partially developed and hasn’t seen much traction recently, and we might also want to move more towards Unreal Toolbox. It’s in a bit of a flux. See more info about those here: https://github.com/EpicGames/UnrealEngine/blob/ue5\-main/Engine/Source/Programs/Horde/Docs/Config/Tools.md

Because of that I would recommend using the P4 method for now.

We are running a Horde server and would like to launch preflight from the SubmitTool. However, Horde requires OAuth and I couldn’t find any information on the OAuth .ini settings. From what I can gather they are

[SubmitTool.OAuthToken] OAuthTokenTool="" OAuthArgs="" OAuthFile=""I think the OAuthTokenTool is supposed to be a script to fetch an OIDC token using a bearer token, but I don’t know how I’m supposed to fetch the bearer token for a given user. Is the OAuthFile an alternative, or is it simply a cache file for storing an unexpired token? Do you have any sample values for these?

Also, we do use Jira, but I haven’t been able to figure out how to use the SubmitTool with our cloud-based Jira service. Is SubmitTool compatible with cloud-based Jira? Is it using an older Service Desk API? Can you provide an explanation of the .ini fields for Jira?

The keys seem to be:

[SubmitTool.Jira] ServerAddress=""; ServiceDeskID=""; RequestFormID=""; ServiceDeskToken=""; SwarmUrlField=""; RequestorField=""; PreflightField=""; StreamField="";

This is what our [SubmitTool.OAuthToken] section looks like:

[SubmitTool.OAuthToken] OAuthTokenTool="$(root)/Engine/Binaries/DotNET/OidcToken/win-x64/OidcToken.exe" OAuthArgs="--Mode GetToken --Service EpicGames-Okta --ResultToConsole true"OidcToken.exe is automatically compiled as part of the engine.

This is what our (sanitized) [SubmitTool.Jira] section looks like:

[SubmitTool.Jira] ServerAddress="[like jira.yourcompany.com]" SwarmURLField="customfield_17463" RequestorField="customfield_26731" PreflightField="customfield_26733" StreamField="customfield_17751" ServiceDeskID=[an integer] RequestFormID=[an integer] ServiceDeskToken="[a token]"We use a cloud-based Jira but via our own URL.

1 Like