Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2ff3dcad
Commit
2ff3dcad
authored
May 31, 2017
by
Jan Christophersen
Committed by
Achilleas Pipinellis
May 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Documentation for GIT_CHECKOUT variable
parent
bfa46a9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+30
-0
No files found.
doc/ci/yaml/README.md
View file @
2ff3dcad
...
@@ -1105,6 +1105,36 @@ variables:
...
@@ -1105,6 +1105,36 @@ variables:
GIT_STRATEGY
:
none
GIT_STRATEGY
:
none
```
```
## Git Checkout
> Introduced in GitLab Runner 9.3
The
`GIT_CHECKOUT`
variable can be used when the
`GIT_STRATEGY`
is set to either
`clone`
or
`fetch`
to specify whether a
`git checkout`
should be run. If not
specified, it defaults to true. Like
`GIT_STRATEGY`
, it can be set in either the
global
[
`variables`
](
#variables
)
section or the
[
`variables`
](
#job-variables
)
section for individual jobs.
If set to
`false`
, the Runner will:
-
when doing
`fetch`
- update the repository and leave working copy on
the current revision,
-
when doing
`clone`
- clone the repository and leave working copy on the
default branch.
Having this setting set to
`true`
will mean that for both
`clone`
and
`fetch`
strategies the Runner will checkout the working copy to a revision related
to the CI pipeline:
```
yaml
variables
:
GIT_STRATEGY
:
clone
GIT_CHECKOUT
:
false
script
:
-
git checkout master
-
git merge $CI_BUILD_REF_NAME
```
## Git Submodule Strategy
## Git Submodule Strategy
> Requires GitLab Runner v1.10+.
> Requires GitLab Runner v1.10+.
...
...
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