Commit ec444e09 authored by Mark Pundsack's avatar Mark Pundsack

Add GIT_STRATEGY and GIT_DEPTH

parent 6980489c
...@@ -814,6 +814,43 @@ job: ...@@ -814,6 +814,43 @@ job:
- execute this after my script - execute this after my script
``` ```
## Git Strategy
>**Note:**
Introduced in GitLab 8.9 as an experimental feature
You can set the `GIT_STRATEGY` used for getting recent application code. `clone`
is slower, but makes sure you have a clean directory before every build. `fetch`
is faster. If specified, it will override the project settings in the web UI.
```
variables:
GIT_STRATEGY: clone
```
or
```
variables:
GIT_STRATEGY: fetch
```
## Shallow cloning
>**Note:**
Introduced in GitLab 8.9 as an experimental feature
You can specify the depth of fetching and cloning using `GIT_DEPTH`. This allows
shallow cloning of the repository. The value is passed to `git fetch` and `git
clone`. If set while cloning, it will imply `--shallow-modules`, which means
submodules will be cloned with a depth of 1 regardless of the value of
`GIT_DEPTH`.
```
variables:
GIT_DEPTH: "1"
```
## Hidden jobs ## Hidden jobs
>**Note:** >**Note:**
......
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