| start | Default value. Indicates that job starts the environment. Deployment will be created after job starts. |
| start | Default value. Indicates that job starts the environment. The deployment is created after the job starts. |
| prepare | Indicates that job is only preparing the environment. Does not affect deployments. [Read more about environments](../environments/index.md#prepare-an-environment) |
| prepare | Indicates that job is only preparing the environment. Does not affect deployments. [Read more about environments](../environments/index.md#prepare-an-environment) |
| stop | Indicates that job stops deployment. See the example below. |
| stop | Indicates that job stops deployment. See the example below. |
...
@@ -2613,10 +2613,10 @@ stop_review_app:
...
@@ -2613,10 +2613,10 @@ stop_review_app:
In the above example we set up the `review_app` job to deploy to the `review`
In the above example we set up the `review_app` job to deploy to the `review`
environment, and we also defined a new `stop_review_app` job under `on_stop`.
environment, and we also defined a new `stop_review_app` job under `on_stop`.
Once the `review_app` job is successfully finished, it will trigger the
After the `review_app` job is finished, it triggers the
`stop_review_app` job based on what is defined under `when`. In this case we
`stop_review_app` job based on what is defined under `when`. In this case we
set it up to `manual` so it will need a [manual action](#whenmanual) via
set it up to `manual` so it needs a [manual action](#whenmanual) from
GitLab's web interface in order to run.
GitLab's user interface to run.
Also in the example, `GIT_STRATEGY` is set to `none` so that GitLab Runner won’t
Also in the example, `GIT_STRATEGY` is set to `none` so that GitLab Runner won’t
try to check out the code after the branch is deleted when the `stop_review_app`
try to check out the code after the branch is deleted when the `stop_review_app`
...
@@ -2636,7 +2636,7 @@ The `stop_review_app` job is **required** to have the following keywords defined
...
@@ -2636,7 +2636,7 @@ The `stop_review_app` job is **required** to have the following keywords defined
Additionally, both jobs should have matching [`rules`](../yaml/README.md#onlyexcept-basic)
Additionally, both jobs should have matching [`rules`](../yaml/README.md#onlyexcept-basic)
or [`only/except`](../yaml/README.md#onlyexcept-basic) configuration. In the example
or [`only/except`](../yaml/README.md#onlyexcept-basic) configuration. In the example
above, if the configuration is not identical, the `stop_review_app` job might not be
above, if the configuration is not identical, the `stop_review_app` job might not be
included in all pipelines that include the `review_app` job, and it will not be
included in all pipelines that include the `review_app` job, and it is not
possible to trigger the `action: stop` to stop the environment automatically.
possible to trigger the `action: stop` to stop the environment automatically.
#### `environment:auto_stop_in`
#### `environment:auto_stop_in`
...
@@ -2681,7 +2681,7 @@ deploy:
...
@@ -2681,7 +2681,7 @@ deploy:
namespace:production
namespace:production
```
```
This will set up the `deploy` job to deploy to the `production`
This configuration sets up the `deploy` job to deploy to the `production`
mounted at the default path `kv-v2`. The last part of the secret's path is the
mounted at the default path `kv-v2`. The last part of the secret's path is the
field to fetch the value for:
field to fetch the value for:
...
@@ -4175,7 +4175,7 @@ May change or be removed completely in future releases.
...
@@ -4175,7 +4175,7 @@ May change or be removed completely in future releases.
You can set the `GIT_STRATEGY` used for getting recent application code, either
You can set the `GIT_STRATEGY` used for getting recent application code, either
globally or per-job in the [`variables`](#variables) section. If left
globally or per-job in the [`variables`](#variables) section. If left
unspecified, the default from project settings will be used.
unspecified, the default from the project settings is used.
There are three possible values: `clone`, `fetch`, and `none`.
There are three possible values: `clone`, `fetch`, and `none`.
...
@@ -4223,10 +4223,10 @@ globally or per-job in the [`variables`](#variables) section.
...
@@ -4223,10 +4223,10 @@ globally or per-job in the [`variables`](#variables) section.
There are three possible values: `none`, `normal`, and `recursive`:
There are three possible values: `none`, `normal`, and `recursive`:
-`none` means that submodules won't be included when fetching the project
-`none` means that submodules are not included when fetching the project
code. This is the default, which matches the pre-v1.10 behavior.
code. This is the default, which matches the pre-v1.10 behavior.
-`normal` means that only the top-level submodules will be included. It's
-`normal` means that only the top-level submodules are included. It's
equivalent to:
equivalent to:
```shell
```shell
...
@@ -4235,7 +4235,7 @@ There are three possible values: `none`, `normal`, and `recursive`:
...
@@ -4235,7 +4235,7 @@ There are three possible values: `none`, `normal`, and `recursive`:
```
```
-`recursive` means that all submodules (including submodules of submodules)
-`recursive` means that all submodules (including submodules of submodules)
will be included. This feature needs Git v1.8.1 and later. When using a
are included. This feature needs Git v1.8.1 and later. When using a
GitLab Runner with an executor not based on Docker, make sure the Git version
GitLab Runner with an executor not based on Docker, make sure the Git version
meets that requirement. It's equivalent to:
meets that requirement. It's equivalent to:
...
@@ -4244,7 +4244,7 @@ There are three possible values: `none`, `normal`, and `recursive`:
...
@@ -4244,7 +4244,7 @@ There are three possible values: `none`, `normal`, and `recursive`:
git submodule update --init--recursive
git submodule update --init--recursive
```
```
Note that for this feature to work correctly, the submodules must be configured
For this feature to work correctly, the submodules must be configured
(in `.gitmodules`) with either:
(in `.gitmodules`) with either:
- the HTTP(S) URL of a publicly-accessible repository, or
- the HTTP(S) URL of a publicly-accessible repository, or
...
@@ -4260,15 +4260,15 @@ The `GIT_CHECKOUT` variable can be used when the `GIT_STRATEGY` is set to either
...
@@ -4260,15 +4260,15 @@ The `GIT_CHECKOUT` variable can be used when the `GIT_STRATEGY` is set to either
specified, it defaults to true. You can set them globally or per-job in the
specified, it defaults to true. You can set them globally or per-job in the
[`variables`](#variables) section.
[`variables`](#variables) section.
If set to `false`, the runner will:
If set to `false`, the runner:
- when doing `fetch` - update the repository and leave working copy on
- when doing `fetch` - updates the repository and leaves the working copy on
the current revision,
the current revision,
- when doing `clone` - clone the repository and leave working copy on the
- when doing `clone` - clones the repository and leaves the working copy on the
default branch.
default branch.
Having this setting set to `true`will mean that for both `clone` and `fetch`
Having this setting set to `true`means that for both `clone` and `fetch`
strategies the runner will checkout the working copy to a revision related
strategies the runner checks out the working copy to a revision related
to the CI pipeline:
to the CI pipeline:
```yaml
```yaml
...
@@ -4314,7 +4314,7 @@ script:
...
@@ -4314,7 +4314,7 @@ script:
The `GIT_FETCH_EXTRA_FLAGS` variable is used to control the behavior of
The `GIT_FETCH_EXTRA_FLAGS` variable is used to control the behavior of
`git fetch`. You can set it globally or per-job in the [`variables`](#variables) section.
`git fetch`. You can set it globally or per-job in the [`variables`](#variables) section.
`GIT_FETCH_EXTRA_FLAGS` accepts all possible options of the [`git fetch`](https://git-scm.com/docs/git-fetch) command, but please note that `GIT_FETCH_EXTRA_FLAGS` flags will be appended after the default flags that can't be modified.
`GIT_FETCH_EXTRA_FLAGS` accepts all possible options of the [`git fetch`](https://git-scm.com/docs/git-fetch) command, but `GIT_FETCH_EXTRA_FLAGS` flags are appended after the default flags that can't be modified.
The default flags are:
The default flags are:
...
@@ -4336,7 +4336,7 @@ script:
...
@@ -4336,7 +4336,7 @@ script:
-ls -al cache/
-ls -al cache/
```
```
The configuration above will result in `git fetch` being called this way:
The configuration above results in `git fetch` being called this way:
```shell
```shell
git fetch origin $REFSPECS--depth 50 --prune
git fetch origin $REFSPECS--depth 50 --prune
...
@@ -4348,8 +4348,8 @@ Where `$REFSPECS` is a value provided to the runner internally by GitLab.
...
@@ -4348,8 +4348,8 @@ Where `$REFSPECS` is a value provided to the runner internally by GitLab.
> Introduced in GitLab, it requires GitLab Runner v1.9+.
> Introduced in GitLab, it requires GitLab Runner v1.9+.
You can set the number for attempts the running job will try to execute each
You can set the number of attempts that the running job tries to execute