From ef615776bf132cb0c56cafd51ac97fb1b7f26a58 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 2 Dec 2021 00:17:32 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .gitlab/ci/rails.gitlab-ci.yml | 16 ++ .gitlab/ci/rules.gitlab-ci.yml | 14 ++ GITALY_SERVER_VERSION | 2 +- Gemfile | 2 + Gemfile.lock | 9 + .../extensions/footnote_definition.js | 21 ++ .../extensions/footnote_reference.js | 37 +++ .../extensions/footnotes_section.js | 19 ++ .../services/create_content_editor.js | 6 + .../services/markdown_serializer.js | 12 + .../ide/components/activity_bar.vue | 2 +- .../input_copy_toggle_visibility.stories.js | 27 +++ .../form/input_copy_toggle_visibility.vue | 124 ++++++++++ app/models/ci/build.rb | 10 - app/services/ci/retry_build_service.rb | 2 +- .../development/drop_detached_partitions.yml | 8 - .../development/partition_pruning.yml | 8 - doc/.vale/gitlab/ElementDescriptors.yml | 3 +- doc/api/job_artifacts.md | 1 + doc/api/jobs.md | 5 + doc/api/status_checks.md | 2 +- doc/api/v3_to_v4.md | 2 +- doc/ci/yaml/index.md | 130 +++++++---- .../database/multiple_databases.md | 2 +- doc/development/pipelines.md | 14 ++ doc/integration/datadog.md | 2 +- doc/topics/git/cherry_picking.md | 2 +- .../project/issues/confidential_issues.md | 2 +- .../project/merge_requests/approvals/index.md | 2 +- .../merge_requests/approvals/settings.md | 2 +- .../merge_requests/cherry_pick_changes.md | 2 +- .../project/merge_requests/confidential.md | 2 +- .../merge_requests/reviews/suggestions.md | 2 +- .../project/merge_requests/status_checks.md | 2 +- doc/user/project/repository/index.md | 27 +-- doc/user/project/time_tracking.md | 2 +- lib/api/entities/ci/job_basic.rb | 1 + .../detached_partition_dropper.rb | 2 - .../partitioning/partition_manager.rb | 6 +- qa/qa/resource/runner.rb | 2 +- scripts/undercoverage | 3 + .../markdown_golden_master_examples.yml | 32 +++ .../services/markdown_serializer_spec.js | 30 +++ .../form/input_copy_toggle_visibility_spec.js | 220 ++++++++++++++++++ .../detached_partition_dropper_spec.rb | 12 - .../partitioning/partition_manager_spec.rb | 24 +- spec/requests/api/ci/jobs_spec.rb | 20 ++ spec/services/ci/retry_build_service_spec.rb | 10 +- spec/simplecov_env.rb | 6 +- 49 files changed, 744 insertions(+), 149 deletions(-) create mode 100644 app/assets/javascripts/content_editor/extensions/footnote_definition.js create mode 100644 app/assets/javascripts/content_editor/extensions/footnote_reference.js create mode 100644 app/assets/javascripts/content_editor/extensions/footnotes_section.js create mode 100644 app/assets/javascripts/vue_shared/components/form/input_copy_toggle_visibility.stories.js create mode 100644 app/assets/javascripts/vue_shared/components/form/input_copy_toggle_visibility.vue delete mode 100644 config/feature_flags/development/drop_detached_partitions.yml delete mode 100644 config/feature_flags/development/partition_pruning.yml create mode 100755 scripts/undercoverage create mode 100644 spec/frontend/vue_shared/components/form/input_copy_toggle_visibility_spec.js diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index 4f6180e2aa3..dce5b72344d 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -519,10 +519,26 @@ rspec:coverage: paths: - coverage/index.html - coverage/assets/ + - coverage/lcov/ - tmp/memory_test/ reports: cobertura: coverage/coverage.xml +rspec:undercoverage: + extends: + - .coverage-base + - .rails:rules:rspec-undercoverage + stage: post-test + needs: ["rspec:coverage"] + script: + - if [ -n "$CI_MERGE_REQUEST_SOURCE_BRANCH_SHA" ]; then + echo "Checking out \$CI_MERGE_REQUEST_SOURCE_BRANCH_SHA ($CI_MERGE_REQUEST_SOURCE_BRANCH_SHA) instead of \$CI_COMMIT_SHA (merge result commit $CI_COMMIT_SHA) so we can use $CI_MERGE_REQUEST_DIFF_BASE_SHA for undercoverage in this merged result pipeline"; + git checkout -f ${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}; + else + echo "Using \$CI_COMMIT_SHA ($CI_COMMIT_SHA) for this non-merge result pipeline."; + fi; + - run_timed_command "scripts/undercoverage" + rspec:feature-flags: extends: - .coverage-base diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index aaa486fce68..c9854fad2b6 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -67,6 +67,9 @@ .if-merge-request-labels-run-review-app: &if-merge-request-labels-run-review-app if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-review-app/' +.if-merge-request-labels-skip-undercoverage: &if-merge-request-labels-skip-undercoverage + if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:skip-undercoverage/' + .if-security-merge-request: &if-security-merge-request if: '$CI_PROJECT_NAMESPACE == "gitlab-org/security" && $CI_MERGE_REQUEST_IID' @@ -1359,6 +1362,17 @@ - <<: *if-merge-request-labels-run-all-rspec when: always +.rails:rules:rspec-undercoverage: + rules: + - <<: *if-not-ee + when: never + - <<: *if-merge-request-labels-skip-undercoverage + allow_failure: true + - <<: *if-merge-request-labels-run-all-rspec + - <<: *if-merge-request-approved + - <<: *if-merge-request + changes: *backend-patterns + .rails:rules:default-branch-schedule-nightly--code-backstage: rules: - <<: *if-default-branch-schedule-nightly diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 8e2779fa0a1..8dbc2c2803b 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -4dd8bfe1307ffcc5a2a3f4eb70da7977a7c1d915 +a191a5d10f0772ae2ed6ec869001ddde6d277827 diff --git a/Gemfile b/Gemfile index 4a6ad99a76a..1d379042099 100644 --- a/Gemfile +++ b/Gemfile @@ -405,7 +405,9 @@ end group :development, :test, :coverage do gem 'simplecov', '~> 0.18.5', require: false + gem 'simplecov-lcov', '~> 0.8.0', require: false gem 'simplecov-cobertura', '~> 1.3.1', require: false + gem 'undercover', '~> 0.4.4', require: false end # Gems required in omnibus-gitlab pipeline diff --git a/Gemfile.lock b/Gemfile.lock index f508dab2d8e..8a1a1a65757 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -645,6 +645,8 @@ GEM concurrent-ruby (~> 1.0) i18n_data (0.8.0) icalendar (2.4.1) + imagen (0.1.8) + parser (>= 2.5, != 2.5.1.1) invisible_captcha (1.1.0) rails (>= 4.2) ipaddress (0.8.3) @@ -1197,6 +1199,7 @@ GEM simplecov-cobertura (1.3.1) simplecov (~> 0.8) simplecov-html (0.12.3) + simplecov-lcov (0.8.0) sixarm_ruby_unaccent (1.2.0) slack-messenger (2.3.4) snowplow-tracker (0.6.1) @@ -1312,6 +1315,10 @@ GEM concurrent-ruby (~> 1.0) u2f (0.2.1) uber (0.1.0) + undercover (0.4.4) + imagen (>= 0.1.8) + rainbow (>= 2.1, < 4.0) + rugged (>= 0.27, < 1.3) unf (0.1.4) unf_ext unf_ext (0.0.7.7) @@ -1626,6 +1633,7 @@ DEPENDENCIES simple_po_parser (~> 1.1.2) simplecov (~> 0.18.5) simplecov-cobertura (~> 1.3.1) + simplecov-lcov (~> 0.8.0) slack-messenger (~> 2.3.4) snowplow-tracker (~> 0.6.1) solargraph (~> 0.43) @@ -1648,6 +1656,7 @@ DEPENDENCIES toml-rb (~> 2.0) truncato (~> 0.7.11) u2f (~> 0.2.1) + undercover (~> 0.4.4) unf (~> 0.1.4) unleash (~> 3.2.2) valid_email (~> 0.1) diff --git a/app/assets/javascripts/content_editor/extensions/footnote_definition.js b/app/assets/javascripts/content_editor/extensions/footnote_definition.js new file mode 100644 index 00000000000..dbab0de3421 --- /dev/null +++ b/app/assets/javascripts/content_editor/extensions/footnote_definition.js @@ -0,0 +1,21 @@ +import { mergeAttributes, Node } from '@tiptap/core'; +import { PARSE_HTML_PRIORITY_HIGHEST } from '../constants'; + +export default Node.create({ + name: 'footnoteDefinition', + + content: 'paragraph', + + group: 'block', + + parseHTML() { + return [ + { tag: 'section.footnotes li' }, + { tag: '.footnote-backref', priority: PARSE_HTML_PRIORITY_HIGHEST, ignore: true }, + ]; + }, + + renderHTML({ HTMLAttributes }) { + return ['li', mergeAttributes(HTMLAttributes), 0]; + }, +}); diff --git a/app/assets/javascripts/content_editor/extensions/footnote_reference.js b/app/assets/javascripts/content_editor/extensions/footnote_reference.js new file mode 100644 index 00000000000..1ac8016f774 --- /dev/null +++ b/app/assets/javascripts/content_editor/extensions/footnote_reference.js @@ -0,0 +1,37 @@ +import { Node, mergeAttributes } from '@tiptap/core'; +import { PARSE_HTML_PRIORITY_HIGHEST } from '../constants'; + +export default Node.create({ + name: 'footnoteReference', + + inline: true, + + group: 'inline', + + atom: true, + + draggable: true, + + selectable: true, + + addAttributes() { + return { + footnoteId: { + default: null, + parseHTML: (element) => element.querySelector('a').getAttribute('id'), + }, + footnoteNumber: { + default: null, + parseHTML: (element) => element.textContent, + }, + }; + }, + + parseHTML() { + return [{ tag: 'sup.footnote-ref', priority: PARSE_HTML_PRIORITY_HIGHEST }]; + }, + + renderHTML({ HTMLAttributes: { footnoteNumber, footnoteId, ...HTMLAttributes } }) { + return ['sup', mergeAttributes(HTMLAttributes), footnoteNumber]; + }, +}); diff --git a/app/assets/javascripts/content_editor/extensions/footnotes_section.js b/app/assets/javascripts/content_editor/extensions/footnotes_section.js new file mode 100644 index 00000000000..914a8934734 --- /dev/null +++ b/app/assets/javascripts/content_editor/extensions/footnotes_section.js @@ -0,0 +1,19 @@ +import { mergeAttributes, Node } from '@tiptap/core'; + +export default Node.create({ + name: 'footnotesSection', + + content: 'footnoteDefinition+', + + group: 'block', + + isolating: true, + + parseHTML() { + return [{ tag: 'section.footnotes > ol' }]; + }, + + renderHTML({ HTMLAttributes }) { + return ['ol', mergeAttributes(HTMLAttributes, { class: 'footnotes gl-font-sm' }), 0]; + }, +}); diff --git a/app/assets/javascripts/content_editor/services/create_content_editor.js b/app/assets/javascripts/content_editor/services/create_content_editor.js index 385f1c63801..f451357e211 100644 --- a/app/assets/javascripts/content_editor/services/create_content_editor.js +++ b/app/assets/javascripts/content_editor/services/create_content_editor.js @@ -19,6 +19,9 @@ import Dropcursor from '../extensions/dropcursor'; import Emoji from '../extensions/emoji'; import Figure from '../extensions/figure'; import FigureCaption from '../extensions/figure_caption'; +import FootnoteDefinition from '../extensions/footnote_definition'; +import FootnoteReference from '../extensions/footnote_reference'; +import FootnotesSection from '../extensions/footnotes_section'; import Frontmatter from '../extensions/frontmatter'; import Gapcursor from '../extensions/gapcursor'; import HardBreak from '../extensions/hard_break'; @@ -94,6 +97,9 @@ export const createContentEditor = ({ Emoji, Figure, FigureCaption, + FootnoteDefinition, + FootnoteReference, + FootnotesSection, Frontmatter, Gapcursor, HardBreak, diff --git a/app/assets/javascripts/content_editor/services/markdown_serializer.js b/app/assets/javascripts/content_editor/services/markdown_serializer.js index 0dd3cb5b73f..38b0438fa3a 100644 --- a/app/assets/javascripts/content_editor/services/markdown_serializer.js +++ b/app/assets/javascripts/content_editor/services/markdown_serializer.js @@ -17,6 +17,9 @@ import Division from '../extensions/division'; import Emoji from '../extensions/emoji'; import Figure from '../extensions/figure'; import FigureCaption from '../extensions/figure_caption'; +import FootnotesSection from '../extensions/footnotes_section'; +import FootnoteDefinition from '../extensions/footnote_definition'; +import FootnoteReference from '../extensions/footnote_reference'; import Frontmatter from '../extensions/frontmatter'; import HardBreak from '../extensions/hard_break'; import Heading from '../extensions/heading'; @@ -156,6 +159,15 @@ const defaultSerializerConfig = { state.write(`:${name}:`); }, + [FootnoteDefinition.name]: (state, node) => { + state.renderInline(node); + }, + [FootnoteReference.name]: (state, node) => { + state.write(`[^${node.attrs.footnoteNumber}]`); + }, + [FootnotesSection.name]: (state, node) => { + state.renderList(node, '', (index) => `[^${index + 1}]: `); + }, [Frontmatter.name]: (state, node) => { const { language } = node.attrs; const syntax = { diff --git a/app/assets/javascripts/ide/components/activity_bar.vue b/app/assets/javascripts/ide/components/activity_bar.vue index c71d911adfb..846b4d92724 100644 --- a/app/assets/javascripts/ide/components/activity_bar.vue +++ b/app/assets/javascripts/ide/components/activity_bar.vue @@ -63,7 +63,7 @@ export default { class="ide-sidebar-link js-ide-review-mode" @click.prevent="changedActivityView($event, $options.leftSidebarViews.review.name)" > - +
  • diff --git a/app/assets/javascripts/vue_shared/components/form/input_copy_toggle_visibility.stories.js b/app/assets/javascripts/vue_shared/components/form/input_copy_toggle_visibility.stories.js new file mode 100644 index 00000000000..cdd7a074f34 --- /dev/null +++ b/app/assets/javascripts/vue_shared/components/form/input_copy_toggle_visibility.stories.js @@ -0,0 +1,27 @@ +import InputCopyToggleVisibility from './input_copy_toggle_visibility.vue'; + +export default { + component: InputCopyToggleVisibility, + title: 'vue_shared/components/form/input_copy_toggle_visibility', +}; + +const defaultProps = { + value: 'hR8x1fuJbzwu5uFKLf9e', + formInputGroupProps: { class: 'gl-form-input-xl' }, +}; + +const Template = (args, { argTypes }) => ({ + components: { InputCopyToggleVisibility }, + props: Object.keys(argTypes), + template: ``, +}); + +export const Default = Template.bind({}); +Default.args = defaultProps; diff --git a/app/assets/javascripts/vue_shared/components/form/input_copy_toggle_visibility.vue b/app/assets/javascripts/vue_shared/components/form/input_copy_toggle_visibility.vue new file mode 100644 index 00000000000..36e3b46a43c --- /dev/null +++ b/app/assets/javascripts/vue_shared/components/form/input_copy_toggle_visibility.vue @@ -0,0 +1,124 @@ + + diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 277e0ccbf23..e0126373864 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -1084,16 +1084,6 @@ module Ci runner&.instance_type? end - def job_variables_attributes - strong_memoize(:job_variables_attributes) do - job_variables.map do |variable| - variable.attributes.except('id', 'job_id', 'encrypted_value', 'encrypted_value_iv').tap do |attrs| - attrs[:value] = variable.value - end - end - end - end - protected def run_status_commit_hooks! diff --git a/app/services/ci/retry_build_service.rb b/app/services/ci/retry_build_service.rb index 4b592bbbb40..ebb07de9d29 100644 --- a/app/services/ci/retry_build_service.rb +++ b/app/services/ci/retry_build_service.rb @@ -7,7 +7,7 @@ module Ci allow_failure stage stage_id stage_idx trigger_request yaml_variables when environment coverage_regex description tag_list protected needs_attributes - resource_group scheduling_type job_variables_attributes].freeze + resource_group scheduling_type].freeze end def self.extra_accessors diff --git a/config/feature_flags/development/drop_detached_partitions.yml b/config/feature_flags/development/drop_detached_partitions.yml deleted file mode 100644 index b49cf78d28c..00000000000 --- a/config/feature_flags/development/drop_detached_partitions.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: drop_detached_partitions -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67056 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/337155 -milestone: '14.2' -type: development -group: group::database -default_enabled: false diff --git a/config/feature_flags/development/partition_pruning.yml b/config/feature_flags/development/partition_pruning.yml deleted file mode 100644 index 02f5dc968a4..00000000000 --- a/config/feature_flags/development/partition_pruning.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: partition_pruning -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67056 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/337153 -milestone: '14.2' -type: development -group: group::database -default_enabled: false diff --git a/doc/.vale/gitlab/ElementDescriptors.yml b/doc/.vale/gitlab/ElementDescriptors.yml index 254da16d00c..36f1202aef1 100644 --- a/doc/.vale/gitlab/ElementDescriptors.yml +++ b/doc/.vale/gitlab/ElementDescriptors.yml @@ -10,5 +10,4 @@ link: https://docs.gitlab.com/ee/development/documentation/styleguide/index.html level: suggestion ignorecase: true swap: - button: 'if possible, rewrite to not use' - area: 'use "section" instead of' + button: 'if possible, rewrite to remove' diff --git a/doc/api/job_artifacts.md b/doc/api/job_artifacts.md index 6d8c256d5aa..7c7847bf368 100644 --- a/doc/api/job_artifacts.md +++ b/doc/api/job_artifacts.md @@ -252,6 +252,7 @@ Example response: "finished_at": "2016-01-11T10:15:10.506Z", "duration": 97.0, "status": "failed", + "failure_reason": "script_failure", "tag": false, "web_url": "https://example.com/foo/bar/-/jobs/42", "user": null diff --git a/doc/api/jobs.md b/doc/api/jobs.md index 2a07e2d92c5..f3971fb5732 100644 --- a/doc/api/jobs.md +++ b/doc/api/jobs.md @@ -71,6 +71,7 @@ Example of response "runner": null, "stage": "test", "status": "failed", + "failure_reason": "script_failure", "tag": false, "web_url": "https://example.com/foo/bar/-/jobs/7", "user": { @@ -126,6 +127,7 @@ Example of response "runner": null, "stage": "test", "status": "failed", + "failure_reason": "stuck_or_timeout_failure", "tag": false, "web_url": "https://example.com/foo/bar/-/jobs/6", "user": { @@ -207,6 +209,7 @@ Example of response "runner": null, "stage": "test", "status": "failed", + "failure_reason": "stuck_or_timeout_failure", "tag": false, "web_url": "https://example.com/foo/bar/-/jobs/6", "user": { @@ -271,6 +274,7 @@ Example of response "runner": null, "stage": "test", "status": "failed", + "failure_reason": "script_failure", "tag": false, "web_url": "https://example.com/foo/bar/-/jobs/7", "user": { @@ -443,6 +447,7 @@ Example of response "runner": null, "stage": "test", "status": "failed", + "failure_reason": "script_failure", "tag": false, "web_url": "https://example.com/foo/bar/-/jobs/8", "user": { diff --git a/doc/api/status_checks.md b/doc/api/status_checks.md index 0c72ee37348..c0dba71bdc5 100644 --- a/doc/api/status_checks.md +++ b/doc/api/status_checks.md @@ -145,6 +145,6 @@ PUT /projects/:id/external_status_checks/:check_id | `external_url` | string | no | URL of external status check resource | | `protected_branch_ids` | `array` | no | IDs of protected branches to scope the rule by | -## Related links +## Related topics - [External status checks](../user/project/merge_requests/status_checks.md). diff --git a/doc/api/v3_to_v4.md b/doc/api/v3_to_v4.md index 3fba95c1fb3..da269073905 100644 --- a/doc/api/v3_to_v4.md +++ b/doc/api/v3_to_v4.md @@ -11,7 +11,7 @@ The GitLab API v3 was [removed](https://gitlab.com/gitlab-org/gitlab-foss/-/issu For information about the current version of the GitLab API, read the [API documentation](index.md). -## Related links +## Related topics - [GitLab v3 API documentation](https://gitlab.com/gitlab-org/gitlab-foss/-/blob/8-16-stable/doc/api/index.md) - [Migration guide](https://gitlab.com/gitlab-org/gitlab-foss/-/blob/11-0-stable/doc/api/v3_to_v4.md) from diff --git a/doc/ci/yaml/index.md b/doc/ci/yaml/index.md index 83b627e08f7..704ae1b6ef4 100644 --- a/doc/ci/yaml/index.md +++ b/doc/ci/yaml/index.md @@ -199,8 +199,10 @@ use `include:file`. You can use `include:file` in combination with `include:proj **Keyword type**: Global keyword. -**Possible inputs**: A full path, relative to the root directory (`/`). -The YAML file must have the extension `.yml` or `.yaml`. +**Possible inputs**: + +- A full path, relative to the root directory (`/`). The YAML file must have the + extension `.yml` or `.yaml`. **Example of `include:file`**: @@ -255,10 +257,10 @@ Use `include:remote` with a full URL to include a file from a different location **Keyword type**: Global keyword. -**Possible inputs**: A public URL accessible by an HTTP/HTTPS `GET` request. -Authentication with the remote URL is not supported. +**Possible inputs**: -The YAML file must have the extension `.yml` or `.yaml`. +- A public URL accessible by an HTTP/HTTPS `GET` request. Authentication with the + remote URL is not supported. The YAML file must have the extension `.yml` or `.yaml`. **Example of `include:remote`**: @@ -281,7 +283,9 @@ Use `include:template` to include [`.gitlab-ci.yml` templates](https://gitlab.co **Keyword type**: Global keyword. -**Possible inputs**: [`.gitlab-ci.yml` templates](https://gitlab.com/gitlab-org/gitlab/-/tree/master/lib/gitlab/ci/templates). +**Possible inputs**: + +- [`.gitlab-ci.yml` templates](https://gitlab.com/gitlab-org/gitlab/-/tree/master/lib/gitlab/ci/templates). **Example of `include:template`**: @@ -556,7 +560,9 @@ The default value for `allow_failure` is: **Keyword type**: Job keyword. You can use it only as part of a job. -**Possible inputs**: `true` or `false`. +**Possible inputs**: + +- `true` or `false`. **Example of `allow_failure`**: @@ -894,7 +900,9 @@ included templates in jobs. **Keyword type**: Job keyword. You can use it only as part of a job or in the [`default` section](#default). -**Possible inputs**: See list of available [artifacts reports types](artifacts_reports.md). +**Possible inputs**: + +- See list of available [artifacts reports types](artifacts_reports.md). **Example of `artifacts:reports`**: @@ -1024,14 +1032,15 @@ Use the `cache:paths` keyword to choose which files or directories to cache. **Keyword type**: Job keyword. You can use it only as part of a job or in the [`default` section](#default). -**Possible inputs**: An array of paths relative to the project directory (`$CI_PROJECT_DIR`). -You can use wildcards that use [glob](https://en.wikipedia.org/wiki/Glob_(programming)) -patterns: +**Possible inputs**: -- In [GitLab Runner 13.0 and later](https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2620), -[`doublestar.Glob`](https://pkg.go.dev/github.com/bmatcuk/doublestar@v1.2.2?tab=doc#Match). -- In GitLab Runner 12.10 and earlier, -[`filepath.Match`](https://pkg.go.dev/path/filepath#Match). +- An array of paths relative to the project directory (`$CI_PROJECT_DIR`). + You can use wildcards that use [glob](https://en.wikipedia.org/wiki/Glob_(programming)) + patterns: + - In [GitLab Runner 13.0 and later](https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2620), + [`doublestar.Glob`](https://pkg.go.dev/github.com/bmatcuk/doublestar@v1.2.2?tab=doc#Match). + - In GitLab Runner 12.10 and earlier, + [`filepath.Match`](https://pkg.go.dev/path/filepath#Match). **Example of `cache:paths`**: @@ -1114,7 +1123,9 @@ which speeds up subsequent pipeline runs. **Keyword type**: Job keyword. You can use it only as part of a job or in the [`default` section](#default). -**Possible inputs**: An array of one or two file paths. +**Possible inputs**: + +- An array of one or two file paths. **Example of `cache:key:files`**: @@ -1190,7 +1201,9 @@ Use `untracked: true` to cache all files that are untracked in your Git reposito **Keyword type**: Job keyword. You can use it only as part of a job or in the [`default` section](#default). -**Possible inputs**: `true` or `false` (default). +**Possible inputs**: + +- `true` or `false` (default). **Example of `cache:untracked`**: @@ -1303,7 +1316,9 @@ line in the job output matches the regular expression. To extract the code coverage value in the matching line, GitLab uses this regular expression: `\d+(\.\d+)?`. -**Possible inputs**: A regular expression. Must start and end with `/`. +**Possible inputs**: + +- A regular expression. Must start and end with `/`. **Example of `coverage`**: @@ -1811,7 +1826,9 @@ where each shell token is a separate string in the array. **Keyword type**: Job keyword. You can use it only as part of a job or in the [`default` section](#default). -**Possible inputs**: A string. +**Possible inputs**: + +- A string. **Example of `image:entrypoint`**: @@ -1918,7 +1935,9 @@ You can't cancel subsequent jobs after a job with `interruptible: false` starts. **Keyword type**: Job keyword. You can use it only as part of a job or in the [`default` section](#default). -**Possible inputs**: `true` or `false` (default). +**Possible inputs**: + +- `true` or `false` (default). **Example of `interruptible`**: @@ -2411,7 +2430,9 @@ to a pipeline, based on the status of [CI/CD variables](../variables/index.md). **Keyword type**: Job keyword. You can use it only as part of a job. -**Possible inputs**: An array of [CI/CD variable expressions](../jobs/job_control.md#cicd-variable-expressions). +**Possible inputs**: + +- An array of [CI/CD variable expressions](../jobs/job_control.md#cicd-variable-expressions). **Example of `only:variables`**: @@ -2490,7 +2511,9 @@ when the Kubernetes service is active in the project. **Keyword type**: Job-specific. You can use it only as part of a job. -**Possible inputs**: The `kubernetes` strategy accepts only the `active` keyword. +**Possible inputs**: + +- The `kubernetes` strategy accepts only the `active` keyword. **Example of `only:kubernetes`**: @@ -2546,7 +2569,9 @@ Parallel jobs are named sequentially from `job_name 1/N` to `job_name N/N`. **Keyword type**: Job keyword. You can use it only as part of a job. -**Possible inputs**: A numeric value from `2` to `50`. +**Possible inputs**: + +- A numeric value from `2` to `50`. **Example of `parallel`**: @@ -2579,7 +2604,9 @@ Multiple runners must exist, or a single runner must be configured to run multip **Keyword type**: Job keyword. You can use it only as part of a job. -**Possible inputs**: A numeric value from `2` to `50`. +**Possible inputs**: + +- A numeric value from `2` to `50`. **Example of `parallel:matrix`**: @@ -2699,7 +2726,9 @@ New tags use the SHA associated with the pipeline. **Keyword type**: Job keyword. You can use it only as part of a job. -**Possible inputs**: A tag name. Can use [CI/CD variables](../variables/index.md). +**Possible inputs**: + +- A tag name. Can use [CI/CD variables](../variables/index.md). **Example of `release:tag_name`**: @@ -2738,7 +2767,9 @@ The release name. If omitted, it is populated with the value of `release: tag_na **Keyword type**: Job keyword. You can use it only as part of a job. -**Possible inputs**: A text string. +**Possible inputs**: + +- A text string. **Example of `release:name`**: @@ -2843,8 +2874,10 @@ can be deployed to, but only one deployment can occur per device at any given ti **Keyword type**: Job keyword. You can use it only as part of a job. -**Possible inputs**: Only letters, digits, `-`, `_`, `/`, `$`, `{`, `}`, `.`, and spaces. -It can't start or end with `/`. +**Possible inputs**: + +- Only letters, digits, `-`, `_`, `/`, `$`, `{`, `}`, `.`, and spaces. + It can't start or end with `/`. **Example of `resource_group`**: @@ -2875,7 +2908,9 @@ to select which failures to retry on. **Keyword type**: Job keyword. You can use it only as part of a job or in the [`default` section](#default). -**Possible inputs**: `0` (default), `1`, or `2`. +**Possible inputs**: + +- `0` (default), `1`, or `2`. **Example of `retry`**: @@ -2894,7 +2929,9 @@ Use `retry:when` with `retry:max` to retry jobs for only specific failure cases. **Keyword type**: Job keyword. You can use it only as part of a job or in the [`default` section](#default). -**Possible inputs**: A single failure type, or an array of one or more failure types: +**Possible inputs**: + +- A single failure type, or an array of one or more failure types: