summaryrefslogtreecommitdiff
path: root/doc/development/cicd/templates.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 09:55:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 09:55:51 +0000
commite8d2c2579383897a1dd7f9debd359abe8ae8373d (patch)
treec42be41678c2586d49a75cabce89322082698334 /doc/development/cicd/templates.md
parentfc845b37ec3a90aaa719975f607740c22ba6a113 (diff)
downloadgitlab-ce-e8d2c2579383897a1dd7f9debd359abe8ae8373d.tar.gz
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'doc/development/cicd/templates.md')
-rw-r--r--doc/development/cicd/templates.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/development/cicd/templates.md b/doc/development/cicd/templates.md
index 8331985697e..204287d7b59 100644
--- a/doc/development/cicd/templates.md
+++ b/doc/development/cicd/templates.md
@@ -7,7 +7,7 @@ type: index, concepts, howto
# Development guide for GitLab CI/CD templates
-This document explains how to develop [GitLab CI/CD templates](../../ci/examples/README.md).
+This document explains how to develop [GitLab CI/CD templates](../../ci/examples/index.md).
## Requirements for CI/CD templates
@@ -16,7 +16,7 @@ Before submitting a merge request with a new or updated CI/CD template, you must
- Place the template in the correct [directory](#template-directories).
- Follow the [CI/CD template authoring guidelines](#template-authoring-guidelines).
- Name the template following the `*.gitlab-ci.yml` format.
-- Use valid [`.gitlab-ci.yml` syntax](../../ci/yaml/README.md). Verify it's valid
+- Use valid [`.gitlab-ci.yml` syntax](../../ci/yaml/index.md). Verify it's valid
with the [CI/CD lint tool](../../ci/lint.md).
- Include [a changelog](../changelog.md) if the merge request introduces a user-facing change.
- Follow the [template review process](#contribute-cicd-template-merge-requests).
@@ -59,8 +59,8 @@ don't have any other `.gitlab-ci.yml` files.
When authoring pipeline templates:
-- Place any [global keywords](../../ci/yaml/README.md#global-keywords) like `image`
- or `before_script` in a [`default`](../../ci/yaml/README.md#custom-default-keyword-values)
+- Place any [global keywords](../../ci/yaml/index.md#global-keywords) like `image`
+ or `before_script` in a [`default`](../../ci/yaml/index.md#custom-default-keyword-values)
section at the top of the template.
- Note clearly in the [code comments](#explain-the-template-with-comments) if the
template is designed to be used with the `includes` keyword in an existing
@@ -68,7 +68,7 @@ When authoring pipeline templates:
A **job template** provides specific jobs that can be added to an existing CI/CD
workflow to accomplish specific tasks. It usually should be used by adding it to
-an existing `.gitlab-ci.yml` file by using the [`includes`](../../ci/yaml/README.md#global-keywords)
+an existing `.gitlab-ci.yml` file by using the [`includes`](../../ci/yaml/index.md#global-keywords)
keyword. You can also copy and paste the contents into an existing `.gitlab-ci.yml` file.
Configure job templates so that users can add them to their current pipeline with very
@@ -77,7 +77,7 @@ other pipeline configuration.
When authoring job templates:
-- Do not use [global](../../ci/yaml/README.md#global-keywords) or [`default`](../../ci/yaml/README.md#custom-default-keyword-values)
+- Do not use [global](../../ci/yaml/index.md#global-keywords) or [`default`](../../ci/yaml/index.md#custom-default-keyword-values)
keywords. When a root `.gitlab-ci.yml` includes a template, global or default keywords
might be overridden and cause unexpected behavior. If a job template requires a
specific stage, explain in the code comments that users must manually add the stage
@@ -127,8 +127,8 @@ job2:
#### Use `rules` instead of `only` or `except`
-Avoid using [`only` or `except`](../../ci/yaml/README.md#only--except) if possible.
-Only and except is not being developed any more, and [`rules`](../../ci/yaml/README.md#rules)
+Avoid using [`only` or `except`](../../ci/yaml/index.md#only--except) if possible.
+Only and except is not being developed any more, and [`rules`](../../ci/yaml/index.md#rules)
is now the preferred syntax:
```yaml