@@ -22,7 +22,7 @@ COPY ${SOURCE_LOCATION} /home/ue4/UnrealEngine
22
22
# The git repository that we will clone
23
23
ARG GIT_REPO=""
24
24
25
- # The git branch/tag that we will checkout
25
+ # The git branch/tag/commit that we will checkout
26
26
ARG GIT_BRANCH=""
27
27
28
28
{% if credential_mode == "secrets" %}
@@ -38,7 +38,18 @@ RUN chmod +x /tmp/git-credential-helper-secrets.sh
38
38
ARG CHANGELIST
39
39
RUN --mount=type=secret,id=username,uid=1000,required \
40
40
--mount=type=secret,id=password,uid=1000,required \
41
- CHANGELIST="$CHANGELIST" git clone --progress --depth=1 -b $GIT_BRANCH $GIT_REPO {{ clone_opts }} /home/ue4/UnrealEngine
41
+ CHANGELIST="$CHANGELIST" \
42
+ mkdir /home/ue4/UnrealEngine && \
43
+ cd /home/ue4/UnrealEngine && \
44
+ git init && \
45
+ {% if git_config %}
46
+ {% for key, value in git_config.items() %}
47
+ git config {{ key }} {{ value }} && \
48
+ {% endfor %}
49
+ {% endif %}
50
+ git remote add origin "$GIT_REPO" && \
51
+ git fetch --progress --depth 1 origin "$GIT_BRANCH" && \
52
+ git checkout FETCH_HEAD
42
53
43
54
{% else %}
44
55
@@ -56,7 +67,17 @@ ENV GIT_ASKPASS=/tmp/git-credential-helper-endpoint.sh
56
67
RUN chmod +x /tmp/git-credential-helper-endpoint.sh
57
68
58
69
# Clone the UE4 git repository using the endpoint-supplied credentials
59
- RUN git clone --progress --depth=1 -b $GIT_BRANCH $GIT_REPO {{ clone_opts }} /home/ue4/UnrealEngine
70
+ RUN mkdir /home/ue4/UnrealEngine && \
71
+ cd /home/ue4/UnrealEngine && \
72
+ git init && \
73
+ {% if git_config %}
74
+ {% for key, value in git_config.items() %}
75
+ git config {{ key }} {{ value }} && \
76
+ {% endfor %}
77
+ {% endif %}
78
+ git remote add origin "$GIT_REPO" && \
79
+ git fetch --progress --depth 1 origin "$GIT_BRANCH" && \
80
+ git checkout FETCH_HEAD
60
81
61
82
{% endif %}
62
83
0 commit comments