Skip to content

Commit e096492

Browse files
committed
Add support for passing secure env vars and runtime BuildGraph args under Linux
This is primarily useful for configuring UBA when building the engine. This initial support can be used when generating Dockerfiles to be built extenerally. Plumbing for using UBA when running `ue4-docker build` will be added later.
1 parent e27168a commit e096492

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • src/ue4docker/dockerfiles/ue4-minimal/linux

src/ue4docker/dockerfiles/ue4-minimal/linux/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,18 @@ RUN if [ -f ./Engine/Build/BatchFiles/BuildUBT.sh ]; then \
2323
fi
2424

2525
# Create an Installed Build of the Engine
26+
ARG BUILDGRAPH_ARGS=""
2627
WORKDIR /home/ue4/UnrealEngine
27-
RUN {% if automatic_build_id %}export BUILD_ID_OVERRIDE=UE_`cat ./Engine/Build/Build.version | jq --raw-output '"\(.MajorVersion).\(.MinorVersion)"'` && {% endif %}\
28+
RUN {% if build_secret_vars %}{% for var in build_secret_vars %}--mount=type=secret,id={{ var }},env={{ var }} {% endfor %}{% endif %}\
29+
{% if automatic_build_id %}export BUILD_ID_OVERRIDE=UE_`cat ./Engine/Build/Build.version | jq --raw-output '"\(.MajorVersion).\(.MinorVersion)"'` && {% endif %}\
2830
./Engine/Build/BatchFiles/RunUAT.sh BuildGraph \
2931
-target="Make Installed Build Linux" \
3032
-script=Engine/Build/InstalledEngineBuild.xml \
3133
-set:HostPlatformOnly=true \
3234
-set:WithClient=true \
3335
-set:WithDDC={% if excluded_components.ddc == true %}false{% else %}true{% endif %} \
3436
-set:WithServer=true \
35-
{%+ if automatic_build_id %}-set:BuildIdOverride="$BUILD_ID_OVERRIDE" {% endif %}{{ buildgraph_args }} && \
37+
{%+ if automatic_build_id %}-set:BuildIdOverride="$BUILD_ID_OVERRIDE" {% endif %}{{ buildgraph_args }} ${BUILDGRAPH_ARGS} && \
3638
rm -R -f /home/ue4/UnrealEngine/LocalBuilds/InstalledDDC
3739

3840
# Ensure UnrealVersionSelector is built, since the prebuilt binaries may not be up-to-date

0 commit comments

Comments
 (0)