diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-06-01 17:42:38 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-06-01 17:42:38 +0800 |
commit | 99b142bcf6be3c5f6a9265bb9d2ff43c6b6e2b0c (patch) | |
tree | 4275179c328e4763cde96c5e4b2b89023eac4866 /doc/ci | |
parent | 9e60d57d9fec420ed2c68d6fe1d3e1af90abb4c5 (diff) | |
parent | f74f03383f5ea1e6243eff1b091211e28c5ddbf1 (diff) | |
download | gitlab-ce-99b142bcf6be3c5f6a9265bb9d2ff43c6b6e2b0c.tar.gz |
Merge remote-tracking branch 'upstream/master' into 25680-CI_ENVIRONMENT_URL
* upstream/master: (251 commits)
Don't match email addresses or foo@bar as user references
Revert "Update GITLAB_SHELL_VERSION"
Update GITLAB_SHELL_VERSION
Add feature toggles through Flipper
Change no_limits to limits
Move includes call to scope
Add GitLab Resources to University
Add Documentation for GIT_CHECKOUT variable
Remove entry variable
Do not try to preload Commits when using Note.includes(:noteable)
Ui improvements for count badges and permission badges
Rename the other jobs
Update jobs_spec for changes from builds_spec
Introduce source to pipeline entity
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
...
Diffstat (limited to 'doc/ci')
-rw-r--r-- | doc/ci/yaml/README.md | 32 |
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+. |