Build UE5 - BredaUniversityGames/JenkinsLib GitHub Wiki
Builds an Unreal Engine 5 project using RunUAT. Supports Blueprint, Precompiled, and Custom build methods.
stages {
perforce.sync()
ue5.build()
// ...
}With overrides:
stages {
perforce.sync()
ue5.build(
UE5_BUILD_CONFIG: 'Shipping',
UE5_BUILD_METHOD_CHOICES: ['Precompiled', 'Blueprint']
)
// ...
}- UE5 engine installed on the build agent
- The
.uprojectfile accessible in the workspace
| Parameter | Default | Description |
|---|---|---|
UE5_BUILD_METHOD |
Blueprint |
Build method: Blueprint, Precompiled, or Custom
|
UE5_ENGINE_VERSION |
(auto-detected) | Engine version (e.g., 5.3). Auto-detected from UE5_ENGINE_ROOT env var. Falls back to a text field if not set. |
UE5_PROJECT_PATH |
(empty) | Relative path to .uproject file (from workspace root) |
UE5_CUSTOM_FLAGS |
-Cook -Allmaps -Build -Stage -Pak -Rocket -Prereqs -Package |
Custom RunUAT flags (only for Custom method) |
UE5_BUILD_CONFIG |
Development |
Build configuration (Development, Shipping, DebugGame, Debug, Test) |
UE5_BUILD_PLATFORM |
Win64 |
Target platform (Win64, Linux, PS5) |
UE5_MATCH_BUILD_ID |
false |
Patch project plugin BuildIds to match the engine (required for precompiled engines) |
UE5_CLEAN_BUILD |
false |
Force a clean build (passes -Clean to RunUAT, removing intermediate files before building) |
Note —
UE5_MATCH_BUILD_ID: Unreal Engine embeds a unique BuildId in every compiled.modulesfile. When you use a precompiled engine, the engine's plugins already have a fixed BuildId. If your project contains its own compiled plugins, their BuildId will differ, and UE will refuse to load them due to the mismatch. Enabling this option copies the engine's BuildId into all project plugin.modulesfiles before the build so they are treated as compatible. See Versioning of Binaries in the UE documentation.
Standard packaging for Blueprint-only or full-source projects. Compiles everything from source.
For projects using a precompiled engine (e.g., installed via Epic Games Launcher or a shared prebuilt engine). Skips editor compilation. Uses -nocompileeditor -skipbuildeditor -nocompile -nocompileuat.
Uses the flags specified in UE5_CUSTOM_FLAGS. Use this when Blueprint or Precompiled don't match your needs.
- Optionally patches project plugin BuildIds to match the engine
- Runs
RunUAT.bat BuildCookRunwith the appropriate flags for the selected method - Archives the build output to
ctx.outputDir - Sets
ctx.buildConfig,ctx.buildPlatform,ctx.engineRoot,ctx.projectPath,ctx.buildEnginefor downstream stages
These methods are available on the ue5 object:
| Method | Description |
|---|---|
ue5.runTests(config) |
Run UE5 automation tests |
ue5.getTestResults() |
Read test results JSON |
ue5.getJUnitXMLFromJSON(json) |
Convert UE5 test JSON to JUnit XML |
ue5.fixupRedirects(config) |
Fix up redirectors in the project |
| Issue | Solution |
|---|---|
| "Unknown UE5 build method" | Check UE5_BUILD_METHOD is one of: Blueprint, Precompiled, Custom |
| Build fails with precompiled engine | Try enabling UE5_MATCH_BUILD_ID to sync build IDs |
| Missing engine version | Set UE5_ENGINE_ROOT env var on the Jenkins node to the directory containing engine installations |
| Cook errors | Ensure all content is saved and there are no broken references |