diff options
author | Pratik Raj <rajpratik71@gmail.com> | 2020-05-27 20:30:22 +0530 |
---|---|---|
committer | Pratik Raj <rajpratik71@gmail.com> | 2020-05-28 09:36:14 +0530 |
commit | 1495d4448fdf97a115e6e808c0363d12219264a7 (patch) | |
tree | 713663d8f4c4a7847c571a09ef32d87c2c47acf8 /benchmarks/workloads/absl | |
parent | e028714a0dd390b2321c4beeac62c5b2904cd917 (diff) |
optimization in git clone using --depth
optimize the git clone using --depth flag in term of size of clone
and also in term's of time taken to fetch the files and commit history
of whole repository .
More detail can be found at blog
https://www.atlassian.com/git/tutorials/big-repositories
Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
Diffstat (limited to 'benchmarks/workloads/absl')
-rw-r--r-- | benchmarks/workloads/absl/Dockerfile | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/benchmarks/workloads/absl/Dockerfile b/benchmarks/workloads/absl/Dockerfile index e935c5ddc..f29cfa156 100644 --- a/benchmarks/workloads/absl/Dockerfile +++ b/benchmarks/workloads/absl/Dockerfile @@ -16,9 +16,10 @@ RUN wget https://github.com/bazelbuild/bazel/releases/download/0.27.0/bazel-0.27 RUN chmod +x bazel-0.27.0-installer-linux-x86_64.sh RUN ./bazel-0.27.0-installer-linux-x86_64.sh -RUN git clone https://github.com/abseil/abseil-cpp.git +RUN mkdir abseil-cpp && cd abseil-cpp \ + && git init && git remote add origin https://github.com/abseil/abseil-cpp.git \ + && git fetch --depth 1 origin 43ef2148c0936ebf7cb4be6b19927a9d9d145b8f && git checkout FETCH_HEAD WORKDIR abseil-cpp -RUN git checkout 43ef2148c0936ebf7cb4be6b19927a9d9d145b8f RUN bazel clean ENV path "absl/base/..." CMD bazel build ${path} 2>&1 |