BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
90ee81dc
Commit
90ee81dc
authored
Jan 15, 2017
by
Jonathon Reinhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document GIT_SUBMODULE_STRATEGY
This documents the `GIT_SUBMODULE_STRATEGY` feature added in gitlab-ci-multi-runner version 1.10. [ci skip]
parent
f1bd9f05
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
1 deletion
+47
-1
git_submodules.md
doc/ci/git_submodules.md
+12
-1
README.md
doc/ci/yaml/README.md
+35
-0
No files found.
doc/ci/git_submodules.md
View file @
90ee81dc
...
...
@@ -61,7 +61,18 @@ correctly with your CI builds:
1.
First, make sure you have used
[
relative URLs
](
#configuring-the-gitmodules-file
)
for the submodules located in the same GitLab server.
1.
Then, use
`git submodule sync/update`
in
`before_script`
:
1.
Next, if you are using
`gitlab-ci-multi-runner`
v1.10+, you can set the
`GIT_SUBMODULE_STRATEGY`
variable to either
`normal`
or
`recursive`
to tell
the runner to fetch your submodules before the build:
```yaml
variables:
GIT_SUBMODULE_STRATEGY: recursive
```
See the
[
`.gitlab-ci.yml` reference
](
yaml/README.md#git-submodule-strategy
)
for more details about
`GIT_SUBMODULE_STRATEGY`
.
1.
If you are using an older version of
`gitlab-ci-multi-runner`
, then use
`git submodule sync/update`
in
`before_script`
:
```yaml
before_script:
...
...
doc/ci/yaml/README.md
View file @
90ee81dc
...
...
@@ -1034,6 +1034,41 @@ variables:
GIT_STRATEGY: none
```
## Git Submodule Strategy
> Requires GitLab Runner v1.10+.
The
`GIT_SUBMODULE_STRATEGY`
variable is used to control if / how Git
submodules are included when fetching the code before a build. Like
`GIT_STRATEGY`
, it can be set in either the global
[
`variables`
](
#variables
)
section or the
[
`variables`
](
#job-variables
)
section for individual jobs.
There are three posible values:
`none`
,
`normal`
, and
`recursive`
:
-
`none`
means that submodules will not be included when fetching the project
code. This is the default, which matches the pre-v1.10 behavior.
-
`normal`
means that only the top-level submodules will be included. It is
equivalent to:
```
$ git submodule sync
$ git submodule update --init
```
- `recursive` means that all submodules (including submodules of submodules)
will be included. It is equivalent to:
```
$ git submodule sync --recursive
$ git submodule update --init --recursive
```
Note that for this feature to work correctly, the submodules must be configured
(in `.gitmodules`) with either:
- the HTTP(S) URL of a publicly-accessible repository, or
- a relative path to another repository on the same GitLab server. See the
[Git submodules](../git_submodules.md) documentation.
## Build stages attempts
> Introduced in GitLab, it requires GitLab Runner v1.9+.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment