From 1edede9276c1be711ddb9eb7fa06ace32a644199 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Wed, 29 Jan 2025 18:06:38 +0400 Subject: ci(fedora41): move Perforce download to a separate image It improves parallelization and speeds up the build. Since downloading is a quick task, put the results to the final image at the beginning to avoid waiting for other (longer) tasks. --- .gitlab/ci/docker/fedora41/Dockerfile | 9 +++++++++ .gitlab/ci/docker/fedora41/install_deps.sh | 4 ---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitlab/ci/docker/fedora41/Dockerfile b/.gitlab/ci/docker/fedora41/Dockerfile index 3d1174e..ba0718c 100644 --- a/.gitlab/ci/docker/fedora41/Dockerfile +++ b/.gitlab/ci/docker/fedora41/Dockerfile @@ -49,11 +49,20 @@ RUN --mount=type=bind,source=dnf.conf,target=/etc/dnf/dnf.conf \ sh /root/install_iwyu.sh +FROM ${BASE_IMAGE} AS p4-dl +# Download Perforce. +# NOTE `curl` is pre-installed in the base image. +RUN curl -C- -L https://www.perforce.com/downloads/perforce/r21.2/bin.linux26x86_64/helix-core-server.tgz \ + | tar -C /usr/local/bin -xvzf - -- p4 p4d + + FROM ${BASE_IMAGE} LABEL maintainer="Ben Boeckel " ENV RBENV_ROOT=/opt/rbenv +COPY --from=p4-dl --chown=root:root /usr/local/bin/p4 /usr/local/bin/p4d /usr/local/bin + RUN --mount=type=bind,source=dnf.conf,target=/etc/dnf/dnf.conf \ --mount=type=bind,source=install_deps.sh,target=/root/install_deps.sh \ --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \ diff --git a/.gitlab/ci/docker/fedora41/install_deps.sh b/.gitlab/ci/docker/fedora41/install_deps.sh index d551374..e0aec8a 100755 --- a/.gitlab/ci/docker/fedora41/install_deps.sh +++ b/.gitlab/ci/docker/fedora41/install_deps.sh @@ -15,7 +15,3 @@ find /usr/lib64/python3.13/site-packages/breezy -type d -a -name tests -exec rm # Ruby rbenv rbenv install 3.1.2 rbenv global 3.1.2 - -# Perforce -curl -L https://www.perforce.com/downloads/perforce/r21.2/bin.linux26x86_64/helix-core-server.tgz -o - \ - | tar -C /usr/local/bin -xvzf - -- p4 p4d -- cgit v0.12