Commit 4617ed84 authored by Marcel Amirault's avatar Marcel Amirault

Merge branch 'docs-ci-variable-git-options' into 'master'

Add docs about passing CI variables as push options

See merge request gitlab-org/gitlab!20634
parents 8a5fb48e 186f6494
...@@ -31,19 +31,25 @@ git push -o <push_option> ...@@ -31,19 +31,25 @@ git push -o <push_option>
## Push options for GitLab CI/CD ## Push options for GitLab CI/CD
If the `ci.skip` push option is used, the commit will be pushed, but no [CI pipeline](../../ci/pipelines.md) You can use push options to skip a CI/CD pipeline, or pass environment variables.
will be created.
| Push option | Description | | Push option | Description |
| ----------- | ----------- | | ------------------------------ | ------------------------------------------------------------------------------------------- |
| `ci.skip` | Do not create a CI pipeline for the latest push. | | `ci.skip` | Do not create a CI pipeline for the latest push. |
| `ci.variable="<name>=<value>"` | Provide [environment variables](../../ci/variables/README.md) to be used in a CI pipeline, if one is created due to the push. |
For example: An example of using `ci.skip`:
```shell ```shell
git push -o ci.skip git push -o ci.skip
``` ```
An example of passing some environment variables for a pipeline:
```shell
git push -o ci.variable="MAX_RETRIES=10" -o ci.variable="MAX_TIME=600"
```
## Push options for merge requests ## Push options for merge requests
You can use Git push options to perform certain actions for merge requests at the same You can use Git push options to perform certain actions for merge requests at the same
......
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