summaryrefslogtreecommitdiff
path: root/doc/ci/jobs
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ci/jobs')
-rw-r--r--doc/ci/jobs/ci_job_token.md2
-rw-r--r--doc/ci/jobs/index.md12
-rw-r--r--doc/ci/jobs/job_control.md12
3 files changed, 15 insertions, 11 deletions
diff --git a/doc/ci/jobs/ci_job_token.md b/doc/ci/jobs/ci_job_token.md
index d95451a67dc..4ae4456c56c 100644
--- a/doc/ci/jobs/ci_job_token.md
+++ b/doc/ci/jobs/ci_job_token.md
@@ -14,7 +14,7 @@ You can use a GitLab CI/CD job token to authenticate with specific API endpoints
- Packages:
- [Package Registry](../../user/packages/package_registry/index.md#use-gitlab-cicd-to-build-packages).
- [Packages API](../../api/packages.md) (project-level).
- - [Container Registry](../../user/packages/container_registry/index.md#build-and-push-by-using-gitlab-cicd)
+ - [Container Registry](../../user/packages/container_registry/build_and_push_images.md#use-gitlab-cicd)
(the `$CI_REGISTRY_PASSWORD` is `$CI_JOB_TOKEN`).
- [Container Registry API](../../api/container_registry.md)
(scoped to the job's project, when the `ci_job_token_scope` feature flag is enabled).
diff --git a/doc/ci/jobs/index.md b/doc/ci/jobs/index.md
index 15ec92a896e..753a755cbf3 100644
--- a/doc/ci/jobs/index.md
+++ b/doc/ci/jobs/index.md
@@ -114,8 +114,10 @@ You can't use these keywords as job names:
Job names must be 255 characters or fewer.
-Use unique names for your jobs. If multiple jobs have the same name,
+Use unique names for your jobs. If multiple jobs have the same name in a file,
only one is added to the pipeline, and it's difficult to predict which one is chosen.
+If the same job name is used in one or more included files,
+[parameters are merged](../yaml/includes.md#override-included-configuration-values).
## Group jobs in a pipeline
@@ -267,10 +269,10 @@ You can do this from the job page of the manual job you want to run with
additional variables. To access this page, select the **name** of the manual job in
the pipeline view, *not* the play (**{play}**) button.
-This is useful when you want to alter the execution of a job that uses
-[custom CI/CD variables](../variables/index.md#custom-cicd-variables).
-Add a variable name (key) and value here to override the value defined in
-[the UI or `.gitlab-ci.yml`](../variables/index.md#custom-cicd-variables),
+Define CI/CD variables here when you want to alter the execution of a job that uses
+[CI/CD variables](../variables/index.md).
+Add a variable name (key) and value to [override the value](../variables/index.md#override-a-defined-cicd-variable)
+defined in the UI or `.gitlab-ci.yml`
for a single run of the manual job.
![Manual job variables](img/manual_job_variables_v13_10.png)
diff --git a/doc/ci/jobs/job_control.md b/doc/ci/jobs/job_control.md
index d26c698af89..3cd57ff6a6a 100644
--- a/doc/ci/jobs/job_control.md
+++ b/doc/ci/jobs/job_control.md
@@ -125,7 +125,7 @@ job:
rules:
- if: $CI_COMMIT_BRANCH
changes:
- compare_to: refs/heads/main
+ compare_to: 'refs/heads/main'
paths:
- '*'
```
@@ -315,7 +315,7 @@ Other commonly used variables for `if` clauses:
- `if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_TITLE =~ /Merge branch.*/`:
If the commit branch is the default branch and the commit message title matches a regular expression.
For example, the default commit message for a merge commit starts with `Merge branch`.
-- `if: $CUSTOM_VARIABLE !~ /regex-expression/`: If the [custom variable](../variables/index.md#custom-cicd-variables)
+- `if: $CUSTOM_VARIABLE !~ /regex-expression/`: If the [custom variable](../variables/index.md)
`CUSTOM_VARIABLE` does **not** match a regular expression.
- `if: $CUSTOM_VARIABLE == "value1"`: If the custom variable `CUSTOM_VARIABLE` is
exactly `value1`.
@@ -754,7 +754,6 @@ deploystacks:
STACK: [monitoring, backup]
- PROVIDER: [gcp, vultr]
STACK: [data]
- environment: $PROVIDER/$STACK
```
This example generates 6 parallel `deploystacks` trigger jobs, each with different values
@@ -986,8 +985,11 @@ Expressions evaluate as `true` if:
For example:
-- `$VARIABLE =~ /^content.*/`
-- `$VARIABLE_1 !~ /^content.*/`
+- `if: $VARIABLE =~ /^content.*/`
+- `if: $VARIABLE !~ /^content.*/`
+
+Single-character regular expressions, like `/./`, are not supported and
+produce an `invalid expression syntax` error.
Pattern matching is case-sensitive by default. Use the `i` flag modifier to make a
pattern case-insensitive. For example: `/pattern/i`.