summaryrefslogtreecommitdiff
path: root/doc/ci
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-06-01 03:39:47 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-06-01 03:39:47 +0800
commit554426ddcaa1d8088c0a4e8c649a7a026036df5a (patch)
tree0f794869fb48dfaaead039bc5c8aef9784a1b4f5 /doc/ci
parent8a1a73a75a4410115b3cc5a85bf5fd85cb634182 (diff)
parentf06daa26efc127565e4e68ca9d4ac62e5a1e3b36 (diff)
downloadgitlab-ce-554426ddcaa1d8088c0a4e8c649a7a026036df5a.tar.gz
Merge remote-tracking branch 'upstream/master' into 24196-protected-variables
* upstream/master: (141 commits) Add Documentation for GIT_CHECKOUT variable Ui improvements for count badges and permission badges Rename the other jobs Update jobs_spec for changes from builds_spec Update docs related to protected actions Add changelog for protected branches abilities fix Ask for an example project for bug reports Center loading spinner in issuable filters Fix chat commands specs related to protected actions Fix builds controller specs related to protected actions Fix pipeline retry specs related to protected actions Fix environment model specs related to protected actions Fix build factory specs related to protected actions Fix job play service specs related to protected actions Fix play status specs related to protected actions Fix deploy chat command specs for protected actions Fix environment specs related to protected actions Use another scope to add the - prefix, feedback: Fix pipeline processing specs related to protected actions Fix build entity specs related to protected actions ...
Diffstat (limited to 'doc/ci')
-rw-r--r--doc/ci/yaml/README.md32
1 files changed, 31 insertions, 1 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index da20076da52..fab5d14ac54 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -591,7 +591,7 @@ Optional manual actions have `allow_failure: true` set by default.
**Manual actions are considered to be write actions, so permissions for
protected branches are used when user wants to trigger an action. In other
words, in order to trigger a manual action assigned to a branch that the
-pipeline is running for, user needs to have ability to push to this branch.**
+pipeline is running for, user needs to have ability to merge to this branch.**
### environment
@@ -1105,6 +1105,36 @@ variables:
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
> Requires GitLab Runner v1.10+.