Fix branch checkout in the build Docker image, refs #21089
[arvados.git] / build / package-build-dockerfiles / ubuntu2004 / Dockerfile
index f85d5d696667759b4f877778c259b12ff0b8654d..a21f8a2ab9e641f62e7014582ec727b94ad2f41e 100644 (file)
@@ -7,6 +7,7 @@ ARG BRANCH
 ARG GOVERSION
 
 FROM ubuntu:focal as build_x86_64
+ONBUILD ARG BRANCH
 # Install go
 ONBUILD ARG GOVERSION
 ONBUILD ADD generated/go${GOVERSION}.linux-amd64.tar.gz /usr/local/
@@ -30,6 +31,7 @@ ONBUILD RUN /usr/bin/apt-get update && /usr/bin/apt-get install -o APT::Immediat
 # ubuntu2204 will have the fix introduced in debian11.
 
 FROM ubuntu:focal as build_aarch64
+ONBUILD ARG BRANCH
 # Install go
 ONBUILD ARG GOVERSION
 ONBUILD ADD generated/go${GOVERSION}.linux-arm64.tar.gz /usr/local/
@@ -72,7 +74,7 @@ ENV MAKE "make --jobs $(grep -c processor /proc/cpuinfo)"
 # Preseed the go module cache and the ruby gems, using the currently checked
 # out branch of the source tree. This avoids potential compatibility issues
 # between the version of Ruby and certain gems.
-RUN git clone --depth 1 git://git.arvados.org/arvados.git /tmp/arvados && \
+RUN git clone git://git.arvados.org/arvados.git /tmp/arvados && \
     cd /tmp/arvados && \
     if [[ -n "${BRANCH}" ]]; then git checkout ${BRANCH}; fi && \
     cd /tmp/arvados/services/api && \