Commit ec102992 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'use-git-depth' into 'master'

Use GIT_DEPTH for builds

## What does this MR do?
Enables experimental feature to use shallow cloning. 

## Why was this MR needed?
To speed up the builds and reduce the pressure on NFS servers. This should save us between 30s to 1m of the time of each build.

## More information
 `GIT_DEPTH`: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/merge_requests/188

## Problems
- Too small value for `GIT_DEPTH` can make it impossible to retry old changes.
You will see `unresolved reference` in build log.
We should then reconsider changing `GIT_DEPTH` to higher value
- Mechanism that rely on `git describe` may not work correctly when `GIT_DEPTH` is set. This will happen, because only part of the git history is present on the build machine

## Requirements
GitLab Runner 1.3.0. Currently all our internal runners use beta release or 1.3.0 with support for `GIT_DEPTH`.

@pcarranza Please decide when to merge that. We should start monitoring to see an impact on our NFS servers.

cc @jacobvosmaer-gitlab @pcarranza 


See merge request !4730
parents 9315597a 4b593a01
...@@ -18,6 +18,7 @@ variables: ...@@ -18,6 +18,7 @@ variables:
SIMPLECOV: "true" SIMPLECOV: "true"
USE_DB: "true" USE_DB: "true"
USE_BUNDLE_INSTALL: "true" USE_BUNDLE_INSTALL: "true"
GIT_DEPTH: "20"
before_script: before_script:
- source ./scripts/prepare_build.sh - source ./scripts/prepare_build.sh
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment