Commit df50ea8b authored by Suzanne Selhorn's avatar Suzanne Selhorn Committed by Marcel Amirault

Docs: More CI YAML Vale fixes

Related to: https://gitlab.com/gitlab-org/gitlab/-/issues/234029
parent c70d2901
...@@ -2296,15 +2296,15 @@ failure. ...@@ -2296,15 +2296,15 @@ failure.
`when` can be set to one of the following values: `when` can be set to one of the following values:
1. `on_success` - execute job only when all jobs from prior stages 1. `on_success` - execute job only when all jobs from prior stages
succeed (or are considered succeeding because they are marked succeed (or are considered succeeding because they have `allow_failure: true`).
`allow_failure`). This is the default. This is the default.
1. `on_failure` - execute job only when at least one job from prior stages 1. `on_failure` - execute job only when at least one job from prior stages
fails. fails.
1. `always` - execute job regardless of the status of jobs from prior stages. 1. `always` - execute job regardless of the status of jobs from prior stages.
1. `manual` - execute job manually (added in GitLab 8.10). Read about 1. `manual` - execute job manually (added in GitLab 8.10). Read about
[manual actions](#whenmanual) below. [manual jobs](#whenmanual) below.
1. `delayed` - execute job after a certain period (added in GitLab 11.14). 1. `delayed` - execute job after a certain period (added in GitLab 11.14).
Read about [delayed actions](#whendelayed) below. Read about [delayed jobs](#whendelayed) below.
1. `never`: 1. `never`:
- With [`rules`](#rules), don't execute job. - With [`rules`](#rules), don't execute job.
- With [`workflow:rules`](#workflowrules), don't run pipeline. - With [`workflow:rules`](#workflowrules), don't run pipeline.
...@@ -2358,45 +2358,41 @@ The above script: ...@@ -2358,45 +2358,41 @@ The above script:
#### `when:manual` #### `when:manual`
> - Introduced in GitLab 8.10. > - Introduced in GitLab 8.10.
> - Blocking manual actions were introduced in GitLab 9.0. > - Blocking manual jobs were introduced in GitLab 9.0.
> - Protected actions were introduced in GitLab 9.2. > - Protected actions were introduced in GitLab 9.2.
Manual actions are a special type of job that are not executed automatically, A manual job is a type of job that is not executed automatically and must be explicitly
they need to be explicitly started by a user. An example usage of manual actions started by a user. You might want to use manual jobs for things like deploying to production.
would be a deployment to a production environment. Manual actions can be started
from the pipeline, job, environment, and deployment views. Read more at the
[environments documentation](../environments/index.md#configuring-manual-deployments).
Manual actions can be either optional or blocking. Blocking manual actions To make a job manual, add `when: manual` to its configuration.
block the execution of the pipeline at the stage this action is defined in. It's
possible to resume execution of the pipeline when someone executes a blocking
manual action by clicking a _play_ button.
When a pipeline is blocked, it isn't merged if Merge When Pipeline Succeeds Manual jobs can be started from the pipeline, job, [environment](../environments/index.md#configuring-manual-deployments),
is set. Blocked pipelines also have a special status, called _manual_. and deployment views.
When the `when:manual` syntax is used, manual actions are non-blocking by
default. If you want to make a manual action blocking, add
`allow_failure: false` to the job's definition in `.gitlab-ci.yml`.
Optional manual actions have `allow_failure: true` set by default and their Manual jobs can be either optional or blocking:
statuses don't contribute to the overall pipeline status. So, if a manual
action fails, the pipeline eventually succeeds.
NOTE: **Note:** - **Optional**: Manual jobs have [`allow_failure: true](#allow_failure) set by default
When using [`rules:`](#rules), `allow_failure` defaults to `false`, including for manual jobs. and are considered optional. The status of an optional manual job does not contribute
to the overall pipeline status. A pipeline can succeed even if all its manual jobs fail.
Manual actions are considered to be write actions, so permissions for - **Blocking**: To make a blocking manual job, add `allow_failure: false` to its configuration.
[protected branches](../../user/project/protected_branches.md) are used when Blocking manual jobs stop further execution of the pipeline at the stage where the
a user wants to trigger an action. In other words, to trigger a manual job is defined. To let the pipeline continue running, click **{play}** (play) on
action assigned to a branch that the pipeline is running for, the user must the blocking manual job.
have the ability to merge to this branch. It's possible to use protected environments
to more strictly [protect manual deployments](#protecting-manual-jobs) from being
run by unauthorized users.
NOTE: **Note:** Merge requests in projects with [merge when pipeline succeeds](../../user/project/merge_requests/merge_when_pipeline_succeeds.md)
Using `when:manual` and `trigger` together results in the error `jobs:#{job-name} when enabled can't be merged with a blocked pipeline. Blocked pipelines show a status
should be on_success, on_failure or always`, because `when:manual` prevents triggers of **blocked**.
being used.
When you use [`rules:`](#rules), `allow_failure` defaults to `false`, including for manual jobs.
To trigger a manual job, a user must have permission to merge to the assigned branch.
You can use [protected branches](../../user/project/protected_branches.md) to more strictly
[protect manual deployments](#protecting-manual-jobs) from being run by unauthorized users.
`when:manual` and [`trigger`](#trigger) cannot be used together. If you use both in
the same job, you receive a `jobs:#{job-name} when should be on_success, on_failure or always`
error.
##### Protecting manual jobs **(PREMIUM)** ##### Protecting manual jobs **(PREMIUM)**
...@@ -2431,9 +2427,9 @@ To do this, you must: ...@@ -2431,9 +2427,9 @@ To do this, you must:
this list can trigger this manual job, as well as GitLab administrators this list can trigger this manual job, as well as GitLab administrators
who are always able to use protected environments. who are always able to use protected environments.
Additionally, if a manual job is defined as blocking by adding `allow_failure: false`, Additionally, if you define a manual job as blocking by adding `allow_failure: false`,
the next stages of the pipeline don't run until the manual job is triggered. This the pipeline's next stages don't run until the manual job is triggered. You can use this
can be used to define a list of users allowed to "approve" later pipeline to define a list of users allowed to "approve" later pipeline
stages by triggering the blocking manual job. stages by triggering the blocking manual job.
#### `when:delayed` #### `when:delayed`
......
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