Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
678e8181aa
commit
3683fb837c
26 changed files with 739 additions and 249 deletions
|
@ -42,7 +42,8 @@ docs-lint markdown:
|
||||||
extends:
|
extends:
|
||||||
- .default-retry
|
- .default-retry
|
||||||
- .docs:rules:docs-lint
|
- .docs:rules:docs-lint
|
||||||
image: "registry.gitlab.com/gitlab-org/gitlab-docs/lint:ruby-2.7.2-alpine-3.12-vale-2.4.3-markdownlint-0.24.0"
|
# When updating the image version here, update it in /scripts/lint-doc.sh too.
|
||||||
|
image: "registry.gitlab.com/gitlab-org/gitlab-docs/lint-markdown:alpine-3.12-vale-2.6.1-markdownlint-0.24.0"
|
||||||
stage: test
|
stage: test
|
||||||
needs: []
|
needs: []
|
||||||
script:
|
script:
|
||||||
|
|
|
@ -53,7 +53,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
|
||||||
def integrations
|
def integrations
|
||||||
return not_found unless instance_level_integrations?
|
return not_found unless instance_level_integrations?
|
||||||
|
|
||||||
@integrations = Service.find_or_initialize_all(Service.for_instance).sort_by(&:title)
|
@integrations = Service.find_or_initialize_all_non_project_specific(Service.for_instance).sort_by(&:title)
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
|
|
@ -8,8 +8,8 @@ class Admin::IntegrationsController < Admin::ApplicationController
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def find_or_initialize_integration(name)
|
def find_or_initialize_non_project_specific_integration(name)
|
||||||
Service.find_or_initialize_integration(name, instance: true)
|
Service.find_or_initialize_non_project_specific_integration(name, instance: true)
|
||||||
end
|
end
|
||||||
|
|
||||||
def integrations_enabled?
|
def integrations_enabled?
|
||||||
|
|
|
@ -52,7 +52,7 @@ module IntegrationsActions
|
||||||
def integration
|
def integration
|
||||||
# Using instance variable `@service` still required as it's used in ServiceParams.
|
# Using instance variable `@service` still required as it's used in ServiceParams.
|
||||||
# Should be removed once that is refactored to use `@integration`.
|
# Should be removed once that is refactored to use `@integration`.
|
||||||
@integration = @service ||= find_or_initialize_integration(params[:id]) # rubocop:disable Gitlab/ModuleWithInstanceVariables
|
@integration = @service ||= find_or_initialize_non_project_specific_integration(params[:id]) # rubocop:disable Gitlab/ModuleWithInstanceVariables
|
||||||
end
|
end
|
||||||
|
|
||||||
def success_message
|
def success_message
|
||||||
|
|
|
@ -10,7 +10,7 @@ module Groups
|
||||||
feature_category :integrations
|
feature_category :integrations
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@integrations = Service.find_or_initialize_all(Service.for_group(group)).sort_by(&:title)
|
@integrations = Service.find_or_initialize_all_non_project_specific(Service.for_group(group)).sort_by(&:title)
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
|
@ -21,8 +21,8 @@ module Groups
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def find_or_initialize_integration(name)
|
def find_or_initialize_non_project_specific_integration(name)
|
||||||
Service.find_or_initialize_integration(name, group_id: group.id)
|
Service.find_or_initialize_non_project_specific_integration(name, group_id: group.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def integrations_enabled?
|
def integrations_enabled?
|
||||||
|
|
|
@ -5,7 +5,7 @@ module Types
|
||||||
class ServiceTypeEnum < BaseEnum
|
class ServiceTypeEnum < BaseEnum
|
||||||
graphql_name 'ServiceType'
|
graphql_name 'ServiceType'
|
||||||
|
|
||||||
::Service.services_types.each do |service_type|
|
::Service.available_services_types(include_dev: false).each do |service_type|
|
||||||
value service_type.underscore.upcase, value: service_type
|
value service_type.underscore.upcase, value: service_type
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1341,8 +1341,7 @@ class Project < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_or_initialize_services
|
def find_or_initialize_services
|
||||||
available_services_names =
|
available_services_names = Service.available_services_names - disabled_services
|
||||||
Service.available_services_names + Service.project_specific_services_names - disabled_services
|
|
||||||
|
|
||||||
available_services_names.map do |service_name|
|
available_services_names.map do |service_name|
|
||||||
find_or_initialize_service(service_name)
|
find_or_initialize_service(service_name)
|
||||||
|
|
|
@ -17,6 +17,7 @@ class Service < ApplicationRecord
|
||||||
pivotaltracker prometheus pushover redmine slack slack_slash_commands teamcity unify_circuit webex_teams youtrack
|
pivotaltracker prometheus pushover redmine slack slack_slash_commands teamcity unify_circuit webex_teams youtrack
|
||||||
].freeze
|
].freeze
|
||||||
|
|
||||||
|
# Fake services to help with local development.
|
||||||
DEV_SERVICE_NAMES = %w[
|
DEV_SERVICE_NAMES = %w[
|
||||||
mock_ci mock_deployment mock_monitoring
|
mock_ci mock_deployment mock_monitoring
|
||||||
].freeze
|
].freeze
|
||||||
|
@ -65,9 +66,9 @@ class Service < ApplicationRecord
|
||||||
scope :by_type, -> (type) { where(type: type) }
|
scope :by_type, -> (type) { where(type: type) }
|
||||||
scope :by_active_flag, -> (flag) { where(active: flag) }
|
scope :by_active_flag, -> (flag) { where(active: flag) }
|
||||||
scope :inherit_from_id, -> (id) { where(inherit_from_id: id) }
|
scope :inherit_from_id, -> (id) { where(inherit_from_id: id) }
|
||||||
scope :for_group, -> (group) { where(group_id: group, type: available_services_types) }
|
scope :for_group, -> (group) { where(group_id: group, type: available_services_types(include_project_specific: false)) }
|
||||||
scope :for_template, -> { where(template: true, type: available_services_types) }
|
scope :for_template, -> { where(template: true, type: available_services_types(include_project_specific: false)) }
|
||||||
scope :for_instance, -> { where(instance: true, type: available_services_types) }
|
scope :for_instance, -> { where(instance: true, type: available_services_types(include_project_specific: false)) }
|
||||||
|
|
||||||
scope :push_hooks, -> { where(push_events: true, active: true) }
|
scope :push_hooks, -> { where(push_events: true, active: true) }
|
||||||
scope :tag_push_hooks, -> { where(tag_push_events: true, active: true) }
|
scope :tag_push_hooks, -> { where(tag_push_events: true, active: true) }
|
||||||
|
@ -168,13 +169,13 @@ class Service < ApplicationRecord
|
||||||
end
|
end
|
||||||
private_class_method :create_nonexistent_templates
|
private_class_method :create_nonexistent_templates
|
||||||
|
|
||||||
def self.find_or_initialize_integration(name, instance: false, group_id: nil)
|
def self.find_or_initialize_non_project_specific_integration(name, instance: false, group_id: nil)
|
||||||
if name.in?(available_services_names)
|
if name.in?(available_services_names(include_project_specific: false))
|
||||||
"#{name}_service".camelize.constantize.find_or_initialize_by(instance: instance, group_id: group_id)
|
"#{name}_service".camelize.constantize.find_or_initialize_by(instance: instance, group_id: group_id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.find_or_initialize_all(scope)
|
def self.find_or_initialize_all_non_project_specific(scope)
|
||||||
scope + build_nonexistent_services_for(scope)
|
scope + build_nonexistent_services_for(scope)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -188,13 +189,14 @@ class Service < ApplicationRecord
|
||||||
def self.list_nonexistent_services_for(scope)
|
def self.list_nonexistent_services_for(scope)
|
||||||
# Using #map instead of #pluck to save one query count. This is because
|
# Using #map instead of #pluck to save one query count. This is because
|
||||||
# ActiveRecord loaded the object here, so we don't need to query again later.
|
# ActiveRecord loaded the object here, so we don't need to query again later.
|
||||||
available_services_types - scope.map(&:type)
|
available_services_types(include_project_specific: false) - scope.map(&:type)
|
||||||
end
|
end
|
||||||
private_class_method :list_nonexistent_services_for
|
private_class_method :list_nonexistent_services_for
|
||||||
|
|
||||||
def self.available_services_names
|
def self.available_services_names(include_project_specific: true, include_dev: true)
|
||||||
service_names = services_names
|
service_names = services_names
|
||||||
service_names += dev_services_names
|
service_names += project_specific_services_names if include_project_specific
|
||||||
|
service_names += dev_services_names if include_dev
|
||||||
|
|
||||||
service_names.sort_by(&:downcase)
|
service_names.sort_by(&:downcase)
|
||||||
end
|
end
|
||||||
|
@ -213,12 +215,10 @@ class Service < ApplicationRecord
|
||||||
[]
|
[]
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.available_services_types
|
def self.available_services_types(include_project_specific: true, include_dev: true)
|
||||||
available_services_names.map { |service_name| "#{service_name}_service".camelize }
|
available_services_names(include_project_specific: include_project_specific, include_dev: include_dev).map do |service_name|
|
||||||
|
"#{service_name}_service".camelize
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.services_types
|
|
||||||
services_names.map { |service_name| "#{service_name}_service".camelize }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.build_from_integration(integration, project_id: nil, group_id: nil)
|
def self.build_from_integration(integration, project_id: nil, group_id: nil)
|
||||||
|
|
|
@ -84,7 +84,6 @@ module Git
|
||||||
end
|
end
|
||||||
|
|
||||||
def enqueue_metrics_dashboard_sync
|
def enqueue_metrics_dashboard_sync
|
||||||
return unless Feature.enabled?(:sync_metrics_dashboards, project)
|
|
||||||
return unless default_branch?
|
return unless default_branch?
|
||||||
|
|
||||||
::Metrics::Dashboard::SyncDashboardsWorker.perform_async(project.id)
|
::Metrics::Dashboard::SyncDashboardsWorker.perform_async(project.id)
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Add alerting support for custom dashboards
|
||||||
|
merge_request: 47704
|
||||||
|
author:
|
||||||
|
type: added
|
|
@ -1,8 +0,0 @@
|
||||||
---
|
|
||||||
name: sync_metrics_dashboards
|
|
||||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39658
|
|
||||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/241793
|
|
||||||
milestone: '13.5'
|
|
||||||
type: development
|
|
||||||
group: group::apm
|
|
||||||
default_enabled: false
|
|
51
doc/.vale/vale.tmpl
Normal file
51
doc/.vale/vale.tmpl
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
{{- /* Modify Vale's output https://docs.errata.ai/vale/cli#--output */ -}}
|
||||||
|
|
||||||
|
{{- /* Keep track of our various counts */ -}}
|
||||||
|
|
||||||
|
{{- $e := 0 -}}
|
||||||
|
{{- $w := 0 -}}
|
||||||
|
{{- $s := 0 -}}
|
||||||
|
{{- $f := 0 -}}
|
||||||
|
|
||||||
|
{{- /* Range over the linted files */ -}}
|
||||||
|
|
||||||
|
{{- range .Files}}
|
||||||
|
|
||||||
|
{{- $f = add1 $f -}}
|
||||||
|
{{- $path := .Path | underline -}}
|
||||||
|
|
||||||
|
{{- /* Range over the file's alerts */ -}}
|
||||||
|
|
||||||
|
{{- range .Alerts -}}
|
||||||
|
|
||||||
|
{{- $error := "" -}}
|
||||||
|
{{- if eq .Severity "error" -}}
|
||||||
|
{{- $error = .Severity | red -}}
|
||||||
|
{{- $e = add1 $e -}}
|
||||||
|
{{- else if eq .Severity "warning" -}}
|
||||||
|
{{- $error = .Severity | yellow -}}
|
||||||
|
{{- $w = add1 $w -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $error = .Severity | blue -}}
|
||||||
|
{{- $s = add1 $s -}}
|
||||||
|
{{- end}}
|
||||||
|
|
||||||
|
{{- /* Variables setup */ -}}
|
||||||
|
|
||||||
|
{{- $path = $path -}}
|
||||||
|
{{- $loc := printf "Line %d, position %d" .Line (index .Span 0) -}}
|
||||||
|
{{- $check := printf "%s" .Check -}}
|
||||||
|
{{- $message := printf "%s" .Message -}}
|
||||||
|
{{- $link := printf "%s" .Link -}}
|
||||||
|
|
||||||
|
{{- /* Output */ -}}
|
||||||
|
|
||||||
|
{{ $path }}:
|
||||||
|
{{ $loc }} (rule {{ $check }})
|
||||||
|
{{ $error }}: {{ $message }}
|
||||||
|
More information: {{ $link }}
|
||||||
|
|
||||||
|
{{end -}}
|
||||||
|
{{end -}}
|
||||||
|
|
||||||
|
{{- $e}} {{"errors" | red}}, {{$w}} {{"warnings" | yellow}}, and {{$s}} {{"suggestions" | blue}} found in {{$f}} {{$f | int | plural "file" "files"}}.
|
|
@ -24,10 +24,10 @@ Here you can access the complete documentation for GitLab, the single applicatio
|
||||||
No matter how you use GitLab, we have documentation for you.
|
No matter how you use GitLab, we have documentation for you.
|
||||||
|
|
||||||
| Essential documentation | Essential documentation |
|
| Essential documentation | Essential documentation |
|
||||||
|:-------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------|
|
|:------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------|
|
||||||
| [**User documentation**](user/index.md)<br>Discover features and concepts for GitLab users. | [**Administrator documentation**](administration/index.md)<br/>Everything GitLab self-managed administrators need to know. |
|
| [**User documentation**](user/index.md)<br>Discover features and concepts for GitLab users. | [**Administrator documentation**](administration/index.md)<br/>Everything GitLab self-managed administrators need to know. |
|
||||||
| [**Contributing to GitLab**](#contributing-to-gitlab)<br/>At GitLab, everyone can contribute! | [**New to Git and GitLab?**](#new-to-git-and-gitlab)<br/>We have the resources to get you started. |
|
| [**Contributing to GitLab**](#contributing-to-gitlab)<br/>At GitLab, everyone can contribute! | [**New to Git and GitLab?**](#new-to-git-and-gitlab)<br/>We have the resources to get you started. |
|
||||||
| [**Build an integration with GitLab**](#build-an-integration-with-gitlab)<br/>Consult our automation and integration documentation. | [**Coming to GitLab from another platform?**](#coming-to-gitlab-from-another-platform)<br/>Consult our handy guides. |
|
| [**Build an integration with GitLab**](#build-an-integration-with-gitlab)<br/>Consult our automation and integration documentation. | [**Coming to GitLab from another platform?**](#coming-to-gitlab-from-another-platform)<br/>Consult our guides. |
|
||||||
| [**Install GitLab**](https://about.gitlab.com/install/)<br/>Installation options for different platforms. | [**Customers**](subscriptions/index.md)<br/>Information for new and existing customers. |
|
| [**Install GitLab**](https://about.gitlab.com/install/)<br/>Installation options for different platforms. | [**Customers**](subscriptions/index.md)<br/>Information for new and existing customers. |
|
||||||
| [**Update GitLab**](update/README.md)<br/>Update your GitLab self-managed instance to the latest version. | [**Reference Architectures**](administration/reference_architectures/index.md)<br/>GitLab's reference architectures |
|
| [**Update GitLab**](update/README.md)<br/>Update your GitLab self-managed instance to the latest version. | [**Reference Architectures**](administration/reference_architectures/index.md)<br/>GitLab's reference architectures |
|
||||||
| [**GitLab releases**](https://about.gitlab.com/releases/)<br/>What's new in GitLab. | |
|
| [**GitLab releases**](https://about.gitlab.com/releases/)<br/>What's new in GitLab. | |
|
||||||
|
@ -93,7 +93,7 @@ GitLab provides statistics and insights into ways you can maximize the value of
|
||||||
The following documentation relates to the DevOps **Manage** stage:
|
The following documentation relates to the DevOps **Manage** stage:
|
||||||
|
|
||||||
| Manage topics | Description |
|
| Manage topics | Description |
|
||||||
|:--------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|:--------------------------------------------------------------------------------------|:---------------------------------------------------------------------------|
|
||||||
| [Authentication and<br/>Authorization](administration/auth/README.md) **(CORE ONLY)** | Supported authentication and authorization providers. |
|
| [Authentication and<br/>Authorization](administration/auth/README.md) **(CORE ONLY)** | Supported authentication and authorization providers. |
|
||||||
| [GitLab Value Stream Analytics](user/analytics/value_stream_analytics.md) | Measure the time it takes to go from an [idea to production](https://about.gitlab.com/blog/2016/08/05/continuous-integration-delivery-and-deployment-with-gitlab/#from-idea-to-production-with-gitlab) for each project you have. |
|
| [GitLab Value Stream Analytics](user/analytics/value_stream_analytics.md) | Measure the time it takes to go from an [idea to production](https://about.gitlab.com/blog/2016/08/05/continuous-integration-delivery-and-deployment-with-gitlab/#from-idea-to-production-with-gitlab) for each project you have. |
|
||||||
| [Instance-level analytics](user/admin_area/analytics/index.md) | Discover statistics on how many GitLab features you use and user activity. |
|
| [Instance-level analytics](user/admin_area/analytics/index.md) | Discover statistics on how many GitLab features you use and user activity. |
|
||||||
|
@ -114,7 +114,7 @@ management tools.
|
||||||
The following documentation relates to the DevOps **Plan** stage:
|
The following documentation relates to the DevOps **Plan** stage:
|
||||||
|
|
||||||
| Plan topics | Description |
|
| Plan topics | Description |
|
||||||
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------|
|
|:-----------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| [Burndown charts](user/project/milestones/burndown_charts.md) **(STARTER)** | Watch your project's progress throughout a specific milestone. |
|
| [Burndown charts](user/project/milestones/burndown_charts.md) **(STARTER)** | Watch your project's progress throughout a specific milestone. |
|
||||||
| [Discussions](user/discussions/index.md) | Threads, comments, and resolvable threads in issues, commits, and merge requests. |
|
| [Discussions](user/discussions/index.md) | Threads, comments, and resolvable threads in issues, commits, and merge requests. |
|
||||||
| [Due dates](user/project/issues/due_dates.md) | Keep track of issue deadlines. |
|
| [Due dates](user/project/issues/due_dates.md) | Keep track of issue deadlines. |
|
||||||
|
@ -151,7 +151,7 @@ The following documentation relates to the DevOps **Create** stage:
|
||||||
#### Projects and groups
|
#### Projects and groups
|
||||||
|
|
||||||
| Create topics - Projects and Groups | Description |
|
| Create topics - Projects and Groups | Description |
|
||||||
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------|
|
|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------|
|
||||||
| [Advanced search](user/search/advanced_global_search.md) **(STARTER)** | Leverage Elasticsearch for faster, more advanced code search across your entire GitLab instance. |
|
| [Advanced search](user/search/advanced_global_search.md) **(STARTER)** | Leverage Elasticsearch for faster, more advanced code search across your entire GitLab instance. |
|
||||||
| [Advanced syntax search](user/search/advanced_search_syntax.md) **(STARTER)** | Use advanced queries for more targeted search results. |
|
| [Advanced syntax search](user/search/advanced_search_syntax.md) **(STARTER)** | Use advanced queries for more targeted search results. |
|
||||||
| [Contribution analytics](user/group/contribution_analytics/index.md) **(STARTER)** | See detailed statistics of group contributors. |
|
| [Contribution analytics](user/group/contribution_analytics/index.md) **(STARTER)** | See detailed statistics of group contributors. |
|
||||||
|
@ -177,7 +177,7 @@ The following documentation relates to the DevOps **Create** stage:
|
||||||
#### Repositories
|
#### Repositories
|
||||||
|
|
||||||
| Create topics - Repositories | Description |
|
| Create topics - Repositories | Description |
|
||||||
|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------|
|
|:-----------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------|
|
||||||
| [Branches](user/project/repository/branches/index.md) and the [default branch](user/project/repository/branches/index.md#default-branch) | How to use branches in GitLab. |
|
| [Branches](user/project/repository/branches/index.md) and the [default branch](user/project/repository/branches/index.md#default-branch) | How to use branches in GitLab. |
|
||||||
| [Commits](user/project/repository/index.md#commits) and [signing commits](user/project/repository/gpg_signed_commits/index.md) | Work with commits, and use GPG to sign your commits. |
|
| [Commits](user/project/repository/index.md#commits) and [signing commits](user/project/repository/gpg_signed_commits/index.md) | Work with commits, and use GPG to sign your commits. |
|
||||||
| [Create branches](user/project/repository/web_editor.md#create-a-new-branch), [create](user/project/repository/web_editor.md#create-a-file)<br/>and [upload](user/project/repository/web_editor.md#upload-a-file) files, and [create directories](user/project/repository/web_editor.md#create-a-directory) | Create branches, create and upload files, and create directories within GitLab. |
|
| [Create branches](user/project/repository/web_editor.md#create-a-new-branch), [create](user/project/repository/web_editor.md#create-a-file)<br/>and [upload](user/project/repository/web_editor.md#upload-a-file) files, and [create directories](user/project/repository/web_editor.md#create-a-directory) | Create branches, create and upload files, and create directories within GitLab. |
|
||||||
|
@ -200,7 +200,7 @@ The following documentation relates to the DevOps **Create** stage:
|
||||||
#### Merge requests
|
#### Merge requests
|
||||||
|
|
||||||
| Create topics - Merge Requests | Description |
|
| Create topics - Merge Requests | Description |
|
||||||
|:--------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------|
|
|:---------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| [Checking out merge requests locally](user/project/merge_requests/reviewing_and_managing_merge_requests.md#checkout-merge-requests-locally-through-the-head-ref) | Tips for working with merge requests locally. |
|
| [Checking out merge requests locally](user/project/merge_requests/reviewing_and_managing_merge_requests.md#checkout-merge-requests-locally-through-the-head-ref) | Tips for working with merge requests locally. |
|
||||||
| [Cherry-picking](user/project/merge_requests/cherry_pick_changes.md) | Use GitLab for cherry-picking changes. |
|
| [Cherry-picking](user/project/merge_requests/cherry_pick_changes.md) | Use GitLab for cherry-picking changes. |
|
||||||
| [Merge request thread resolution](user/discussions/index.md#moving-a-single-thread-to-a-new-issue) | Resolve threads, move threads in a merge request to an issue, and only allow merge requests to be merged if all threads are resolved. |
|
| [Merge request thread resolution](user/discussions/index.md#moving-a-single-thread-to-a-new-issue) | Resolve threads, move threads in a merge request to an issue, and only allow merge requests to be merged if all threads are resolved. |
|
||||||
|
@ -216,7 +216,7 @@ The following documentation relates to the DevOps **Create** stage:
|
||||||
#### Integration and Automation
|
#### Integration and Automation
|
||||||
|
|
||||||
| Create topics - Integration and Automation | Description |
|
| Create topics - Integration and Automation | Description |
|
||||||
|:------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------|
|
|:----------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------|
|
||||||
| [GitLab REST API](api/README.md) | Integrate with GitLab using our REST API. |
|
| [GitLab REST API](api/README.md) | Integrate with GitLab using our REST API. |
|
||||||
| [GitLab GraphQL API](api/graphql/index.md) | Integrate with GitLab using our GraphQL API. |
|
| [GitLab GraphQL API](api/graphql/index.md) | Integrate with GitLab using our GraphQL API. |
|
||||||
| [GitLab integrations](integration/README.md) | Integrate with multiple third-party services with GitLab to allow external issue trackers and external authentication. |
|
| [GitLab integrations](integration/README.md) | Integrate with multiple third-party services with GitLab to allow external issue trackers and external authentication. |
|
||||||
|
@ -244,7 +244,7 @@ scales to run your tests faster.
|
||||||
The following documentation relates to the DevOps **Verify** stage:
|
The following documentation relates to the DevOps **Verify** stage:
|
||||||
|
|
||||||
| Verify topics | Description |
|
| Verify topics | Description |
|
||||||
|:----------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------|
|
|:-----------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------|
|
||||||
| [Code Quality reports](user/project/merge_requests/code_quality.md) | Analyze source code quality. |
|
| [Code Quality reports](user/project/merge_requests/code_quality.md) | Analyze source code quality. |
|
||||||
| [GitLab CI/CD](ci/README.md) | Explore the features and capabilities of Continuous Integration with GitLab. |
|
| [GitLab CI/CD](ci/README.md) | Explore the features and capabilities of Continuous Integration with GitLab. |
|
||||||
| [Unit test reports](ci/unit_test_reports.md) | Display Unit test reports on merge requests. |
|
| [Unit test reports](ci/unit_test_reports.md) | Display Unit test reports on merge requests. |
|
||||||
|
@ -267,7 +267,7 @@ packages, which can be consumed as a dependency in downstream projects.
|
||||||
The following documentation relates to the DevOps **Package** stage:
|
The following documentation relates to the DevOps **Package** stage:
|
||||||
|
|
||||||
| Package topics | Description |
|
| Package topics | Description |
|
||||||
|:----------------------------------------------------------------|:-------------------------------------------------------|
|
|:----------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| [Container Registry](user/packages/container_registry/index.md) | The GitLab Container Registry enables every project in GitLab to have its own space to store [Docker](https://www.docker.com/) images. |
|
| [Container Registry](user/packages/container_registry/index.md) | The GitLab Container Registry enables every project in GitLab to have its own space to store [Docker](https://www.docker.com/) images. |
|
||||||
| [Dependency Proxy](user/packages/dependency_proxy/index.md) | The GitLab Dependency Proxy sets up a local proxy for frequently used upstream images/packages. |
|
| [Dependency Proxy](user/packages/dependency_proxy/index.md) | The GitLab Dependency Proxy sets up a local proxy for frequently used upstream images/packages. |
|
||||||
| [Package Registry](user/packages/package_registry/index.md) | Use GitLab as a private or public registry for a variety of common package managers, including [NPM](user/packages/npm_registry/index.md), [Maven](user/packages/maven_repository/index.md), [PyPI](user/packages/pypi_repository/index.md), and others. You can also store generic files. |
|
| [Package Registry](user/packages/package_registry/index.md) | Use GitLab as a private or public registry for a variety of common package managers, including [NPM](user/packages/npm_registry/index.md), [Maven](user/packages/maven_repository/index.md), [PyPI](user/packages/pypi_repository/index.md), and others. You can also store generic files. |
|
||||||
|
@ -289,7 +289,7 @@ remediation processes when needed.
|
||||||
The following documentation relates to the DevOps **Secure** stage:
|
The following documentation relates to the DevOps **Secure** stage:
|
||||||
|
|
||||||
| Secure topics | Description |
|
| Secure topics | Description |
|
||||||
|:------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------|
|
|:------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------|
|
||||||
| [Compliance Dashboard](user/compliance/compliance_dashboard/index.md) **(ULTIMATE)** | View the most recent Merge Request activity in a group. |
|
| [Compliance Dashboard](user/compliance/compliance_dashboard/index.md) **(ULTIMATE)** | View the most recent Merge Request activity in a group. |
|
||||||
| [Container Scanning](user/application_security/container_scanning/index.md) **(ULTIMATE)** | Use Clair to scan Docker images for known vulnerabilities. |
|
| [Container Scanning](user/application_security/container_scanning/index.md) **(ULTIMATE)** | Use Clair to scan Docker images for known vulnerabilities. |
|
||||||
| [Dependency List](user/application_security/dependency_list/index.md) **(ULTIMATE)** | View your project's dependencies and their known vulnerabilities. |
|
| [Dependency List](user/application_security/dependency_list/index.md) **(ULTIMATE)** | View your project's dependencies and their known vulnerabilities. |
|
||||||
|
@ -311,7 +311,7 @@ confidently and securely with GitLab’s built-in Continuous Delivery and Deploy
|
||||||
The following documentation relates to the DevOps **Release** stage:
|
The following documentation relates to the DevOps **Release** stage:
|
||||||
|
|
||||||
| Release topics | Description |
|
| Release topics | Description |
|
||||||
|:------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------|
|
|:---------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| [Auto Deploy](topics/autodevops/stages.md#auto-deploy) | Configure GitLab for the deployment of your application. |
|
| [Auto Deploy](topics/autodevops/stages.md#auto-deploy) | Configure GitLab for the deployment of your application. |
|
||||||
| [Canary Deployments](user/project/canary_deployments.md) **(PREMIUM)** | Employ a popular CI strategy where a small portion of the fleet is updated to the new version first. |
|
| [Canary Deployments](user/project/canary_deployments.md) **(PREMIUM)** | Employ a popular CI strategy where a small portion of the fleet is updated to the new version first. |
|
||||||
| [Deploy Boards](user/project/deploy_boards.md) **(PREMIUM)** | View the current health and status of each CI environment running on Kubernetes, displaying the status of the pods in the deployment. |
|
| [Deploy Boards](user/project/deploy_boards.md) **(PREMIUM)** | View the current health and status of each CI environment running on Kubernetes, displaying the status of the pods in the deployment. |
|
||||||
|
@ -337,7 +337,7 @@ configuration. Then customize everything from buildpacks to CI/CD.
|
||||||
The following documentation relates to the DevOps **Configure** stage:
|
The following documentation relates to the DevOps **Configure** stage:
|
||||||
|
|
||||||
| Configure topics | Description |
|
| Configure topics | Description |
|
||||||
|:-----------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------|
|
|:----------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------|
|
||||||
| [Auto DevOps](topics/autodevops/index.md) | Automatically employ a complete DevOps lifecycle. |
|
| [Auto DevOps](topics/autodevops/index.md) | Automatically employ a complete DevOps lifecycle. |
|
||||||
| [Create Kubernetes clusters](user/project/clusters/add_remove_clusters.md#create-new-cluster) | Use Kubernetes and GitLab. |
|
| [Create Kubernetes clusters](user/project/clusters/add_remove_clusters.md#create-new-cluster) | Use Kubernetes and GitLab. |
|
||||||
| [Executable Runbooks](user/project/clusters/runbooks/index.md) | Documented procedures that explain how to carry out particular processes. |
|
| [Executable Runbooks](user/project/clusters/runbooks/index.md) | Documented procedures that explain how to carry out particular processes. |
|
||||||
|
@ -392,10 +392,10 @@ your applications that are deployed in production.
|
||||||
The following documentation relates to the DevOps **Defend** stage:
|
The following documentation relates to the DevOps **Defend** stage:
|
||||||
|
|
||||||
| Defend topics | Description |
|
| Defend topics | Description |
|
||||||
|:------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------|
|
|:---------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
|
||||||
| [Web Application Firewall with ModSecurity](user/compliance/compliance_dashboard/index.md) | Filter, monitor, and block HTTP traffic to and from a web application. |
|
| [Web Application Firewall with ModSecurity](user/compliance/compliance_dashboard/index.md) | Filter, monitor, and block HTTP traffic to and from a web application. |
|
||||||
| [Container host security](user/clusters/applications.md#install-falco-using-gitlab-cicd) | Detect and respond to security threats at the Kubernetes, network, and host level. |
|
| [Container host security](user/clusters/applications.md#install-falco-using-gitlab-cicd) | Detect and respond to security threats at the Kubernetes, network, and host level. |
|
||||||
| [Container network security](user/clusters/applications.md#install-cilium-using-gitlab-cicd) | Detect and block unauthorized network traffic between pods and to/from the internet.|
|
| [Container network security](user/clusters/applications.md#install-cilium-using-gitlab-cicd) | Detect and block unauthorized network traffic between pods and to/from the internet. |
|
||||||
|
|
||||||
## New to Git and GitLab?
|
## New to Git and GitLab?
|
||||||
|
|
||||||
|
@ -404,7 +404,7 @@ Working with new systems can be daunting.
|
||||||
We have the following documentation to rapidly uplift your GitLab knowledge:
|
We have the following documentation to rapidly uplift your GitLab knowledge:
|
||||||
|
|
||||||
| Topic | Description |
|
| Topic | Description |
|
||||||
|:-----------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
|:--------------------------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
||||||
| [GitLab basics guides](gitlab-basics/README.md) | Start working on the command line and with GitLab. |
|
| [GitLab basics guides](gitlab-basics/README.md) | Start working on the command line and with GitLab. |
|
||||||
| [GitLab workflow overview](https://about.gitlab.com/blog/2016/10/25/gitlab-workflow-an-overview/) | Enhance your workflow with the best of GitLab Workflow. |
|
| [GitLab workflow overview](https://about.gitlab.com/blog/2016/10/25/gitlab-workflow-an-overview/) | Enhance your workflow with the best of GitLab Workflow. |
|
||||||
| [Get started with GitLab CI/CD](ci/quick_start/README.md) | Quickly implement GitLab CI/CD. |
|
| [Get started with GitLab CI/CD](ci/quick_start/README.md) | Quickly implement GitLab CI/CD. |
|
||||||
|
@ -439,7 +439,7 @@ Learn more about GitLab account management:
|
||||||
Learn more about using Git, and using Git with GitLab:
|
Learn more about using Git, and using Git with GitLab:
|
||||||
|
|
||||||
| Topic | Description |
|
| Topic | Description |
|
||||||
|:----------------------------------------------------------------------------|:---------------------------------------------------------------------------|
|
|:-----------------------------------------------------------------------------|:---------------------------------------------------------------------------|
|
||||||
| [Git](topics/git/index.md) | Getting started with Git, branching strategies, Git LFS, and advanced use. |
|
| [Git](topics/git/index.md) | Getting started with Git, branching strategies, Git LFS, and advanced use. |
|
||||||
| [Git cheat sheet](https://about.gitlab.com/images/press/git-cheat-sheet.pdf) | Download a PDF describing the most used Git operations. |
|
| [Git cheat sheet](https://about.gitlab.com/images/press/git-cheat-sheet.pdf) | Download a PDF describing the most used Git operations. |
|
||||||
| [GitLab Flow](topics/gitlab_flow.md) | Explore the best of Git with the GitLab Flow strategy. |
|
| [GitLab Flow](topics/gitlab_flow.md) | Explore the best of Git with the GitLab Flow strategy. |
|
||||||
|
@ -455,7 +455,7 @@ Learn more about using Git, and using Git with GitLab:
|
||||||
If you are coming to GitLab from another platform, the following information is useful:
|
If you are coming to GitLab from another platform, the following information is useful:
|
||||||
|
|
||||||
| Topic | Description |
|
| Topic | Description |
|
||||||
|:---------------------------------------------------------------|:---------------------------------------------------------------------------------------|
|
|:----------------------------------------------------|:---------------------------------------------------------------------------------------|
|
||||||
| [Importing to GitLab](user/project/import/index.md) | Import your projects from GitHub, Bitbucket, GitLab.com, FogBugz, and SVN into GitLab. |
|
| [Importing to GitLab](user/project/import/index.md) | Import your projects from GitHub, Bitbucket, GitLab.com, FogBugz, and SVN into GitLab. |
|
||||||
| [Migrating from SVN](user/project/import/svn.md) | Convert a SVN repository to Git and GitLab. |
|
| [Migrating from SVN](user/project/import/svn.md) | Convert a SVN repository to Git and GitLab. |
|
||||||
|
|
||||||
|
@ -470,7 +470,7 @@ If you are coming to GitLab from another platform, the following information is
|
||||||
There are many ways to integrate with GitLab, including:
|
There are many ways to integrate with GitLab, including:
|
||||||
|
|
||||||
| Topic | Description |
|
| Topic | Description |
|
||||||
|:-----------------------------------------------------------|:------------------------------------------------|
|
|:-----------------------------------------------------------|:-----------------------------------------------|
|
||||||
| [GitLab REST API](api/README.md) | Integrate with GitLab using our REST API. |
|
| [GitLab REST API](api/README.md) | Integrate with GitLab using our REST API. |
|
||||||
| [GitLab GraphQL API](api/graphql/index.md) | Integrate with GitLab using our GraphQL API. |
|
| [GitLab GraphQL API](api/graphql/index.md) | Integrate with GitLab using our GraphQL API. |
|
||||||
| [Integrations and automation](#integration-and-automation) | All GitLab integration and automation options. |
|
| [Integrations and automation](#integration-and-automation) | All GitLab integration and automation options. |
|
||||||
|
|
|
@ -8416,6 +8416,37 @@ type GeoNode {
|
||||||
"""
|
"""
|
||||||
selectiveSyncType: String
|
selectiveSyncType: String
|
||||||
|
|
||||||
|
"""
|
||||||
|
Find snippet repository registries on this Geo node. Available only when
|
||||||
|
feature flag `geo_snippet_repository_replication` is enabled
|
||||||
|
"""
|
||||||
|
snippetRepositoryRegistries(
|
||||||
|
"""
|
||||||
|
Returns the elements in the list that come after the specified cursor.
|
||||||
|
"""
|
||||||
|
after: String
|
||||||
|
|
||||||
|
"""
|
||||||
|
Returns the elements in the list that come before the specified cursor.
|
||||||
|
"""
|
||||||
|
before: String
|
||||||
|
|
||||||
|
"""
|
||||||
|
Returns the first _n_ elements from the list.
|
||||||
|
"""
|
||||||
|
first: Int
|
||||||
|
|
||||||
|
"""
|
||||||
|
Filters registries by their ID
|
||||||
|
"""
|
||||||
|
ids: [ID!]
|
||||||
|
|
||||||
|
"""
|
||||||
|
Returns the last _n_ elements from the list.
|
||||||
|
"""
|
||||||
|
last: Int
|
||||||
|
): SnippetRepositoryRegistryConnection
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Indicates if this secondary node will replicate blobs in Object Storage
|
Indicates if this secondary node will replicate blobs in Object Storage
|
||||||
"""
|
"""
|
||||||
|
@ -20545,6 +20576,86 @@ type SnippetPermissions {
|
||||||
updateSnippet: Boolean!
|
updateSnippet: Boolean!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"""
|
||||||
|
Represents the Geo sync and verification state of a snippet repository
|
||||||
|
"""
|
||||||
|
type SnippetRepositoryRegistry {
|
||||||
|
"""
|
||||||
|
Timestamp when the SnippetRepositoryRegistry was created
|
||||||
|
"""
|
||||||
|
createdAt: Time
|
||||||
|
|
||||||
|
"""
|
||||||
|
ID of the SnippetRepositoryRegistry
|
||||||
|
"""
|
||||||
|
id: ID!
|
||||||
|
|
||||||
|
"""
|
||||||
|
Error message during sync of the SnippetRepositoryRegistry
|
||||||
|
"""
|
||||||
|
lastSyncFailure: String
|
||||||
|
|
||||||
|
"""
|
||||||
|
Timestamp of the most recent successful sync of the SnippetRepositoryRegistry
|
||||||
|
"""
|
||||||
|
lastSyncedAt: Time
|
||||||
|
|
||||||
|
"""
|
||||||
|
Timestamp after which the SnippetRepositoryRegistry should be resynced
|
||||||
|
"""
|
||||||
|
retryAt: Time
|
||||||
|
|
||||||
|
"""
|
||||||
|
Number of consecutive failed sync attempts of the SnippetRepositoryRegistry
|
||||||
|
"""
|
||||||
|
retryCount: Int
|
||||||
|
|
||||||
|
"""
|
||||||
|
ID of the Snippet Repository
|
||||||
|
"""
|
||||||
|
snippetRepositoryId: ID!
|
||||||
|
|
||||||
|
"""
|
||||||
|
Sync state of the SnippetRepositoryRegistry
|
||||||
|
"""
|
||||||
|
state: RegistryState
|
||||||
|
}
|
||||||
|
|
||||||
|
"""
|
||||||
|
The connection type for SnippetRepositoryRegistry.
|
||||||
|
"""
|
||||||
|
type SnippetRepositoryRegistryConnection {
|
||||||
|
"""
|
||||||
|
A list of edges.
|
||||||
|
"""
|
||||||
|
edges: [SnippetRepositoryRegistryEdge]
|
||||||
|
|
||||||
|
"""
|
||||||
|
A list of nodes.
|
||||||
|
"""
|
||||||
|
nodes: [SnippetRepositoryRegistry]
|
||||||
|
|
||||||
|
"""
|
||||||
|
Information to aid in pagination.
|
||||||
|
"""
|
||||||
|
pageInfo: PageInfo!
|
||||||
|
}
|
||||||
|
|
||||||
|
"""
|
||||||
|
An edge in a connection.
|
||||||
|
"""
|
||||||
|
type SnippetRepositoryRegistryEdge {
|
||||||
|
"""
|
||||||
|
A cursor for use in pagination.
|
||||||
|
"""
|
||||||
|
cursor: String!
|
||||||
|
|
||||||
|
"""
|
||||||
|
The item at the end of the edge.
|
||||||
|
"""
|
||||||
|
node: SnippetRepositoryRegistry
|
||||||
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Common sort values
|
Common sort values
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -23361,6 +23361,77 @@
|
||||||
"isDeprecated": false,
|
"isDeprecated": false,
|
||||||
"deprecationReason": null
|
"deprecationReason": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "snippetRepositoryRegistries",
|
||||||
|
"description": "Find snippet repository registries on this Geo node. Available only when feature flag `geo_snippet_repository_replication` is enabled",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"name": "ids",
|
||||||
|
"description": "Filters registries by their ID",
|
||||||
|
"type": {
|
||||||
|
"kind": "LIST",
|
||||||
|
"name": null,
|
||||||
|
"ofType": {
|
||||||
|
"kind": "NON_NULL",
|
||||||
|
"name": null,
|
||||||
|
"ofType": {
|
||||||
|
"kind": "SCALAR",
|
||||||
|
"name": "ID",
|
||||||
|
"ofType": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"defaultValue": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "after",
|
||||||
|
"description": "Returns the elements in the list that come after the specified cursor.",
|
||||||
|
"type": {
|
||||||
|
"kind": "SCALAR",
|
||||||
|
"name": "String",
|
||||||
|
"ofType": null
|
||||||
|
},
|
||||||
|
"defaultValue": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "before",
|
||||||
|
"description": "Returns the elements in the list that come before the specified cursor.",
|
||||||
|
"type": {
|
||||||
|
"kind": "SCALAR",
|
||||||
|
"name": "String",
|
||||||
|
"ofType": null
|
||||||
|
},
|
||||||
|
"defaultValue": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "first",
|
||||||
|
"description": "Returns the first _n_ elements from the list.",
|
||||||
|
"type": {
|
||||||
|
"kind": "SCALAR",
|
||||||
|
"name": "Int",
|
||||||
|
"ofType": null
|
||||||
|
},
|
||||||
|
"defaultValue": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "last",
|
||||||
|
"description": "Returns the last _n_ elements from the list.",
|
||||||
|
"type": {
|
||||||
|
"kind": "SCALAR",
|
||||||
|
"name": "Int",
|
||||||
|
"ofType": null
|
||||||
|
},
|
||||||
|
"defaultValue": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": {
|
||||||
|
"kind": "OBJECT",
|
||||||
|
"name": "SnippetRepositoryRegistryConnection",
|
||||||
|
"ofType": null
|
||||||
|
},
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "syncObjectStorage",
|
"name": "syncObjectStorage",
|
||||||
"description": "Indicates if this secondary node will replicate blobs in Object Storage",
|
"description": "Indicates if this secondary node will replicate blobs in Object Storage",
|
||||||
|
@ -58259,6 +58330,12 @@
|
||||||
"isDeprecated": false,
|
"isDeprecated": false,
|
||||||
"deprecationReason": null
|
"deprecationReason": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "GITHUB_SERVICE",
|
||||||
|
"description": null,
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "HANGOUTS_CHAT_SERVICE",
|
"name": "HANGOUTS_CHAT_SERVICE",
|
||||||
"description": null,
|
"description": null,
|
||||||
|
@ -58277,6 +58354,12 @@
|
||||||
"isDeprecated": false,
|
"isDeprecated": false,
|
||||||
"deprecationReason": null
|
"deprecationReason": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "JENKINS_SERVICE",
|
||||||
|
"description": null,
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "JIRA_SERVICE",
|
"name": "JIRA_SERVICE",
|
||||||
"description": null,
|
"description": null,
|
||||||
|
@ -58372,18 +58455,6 @@
|
||||||
"description": null,
|
"description": null,
|
||||||
"isDeprecated": false,
|
"isDeprecated": false,
|
||||||
"deprecationReason": null
|
"deprecationReason": null
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "GITHUB_SERVICE",
|
|
||||||
"description": null,
|
|
||||||
"isDeprecated": false,
|
|
||||||
"deprecationReason": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "JENKINS_SERVICE",
|
|
||||||
"description": null,
|
|
||||||
"isDeprecated": false,
|
|
||||||
"deprecationReason": null
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"possibleTypes": null
|
"possibleTypes": null
|
||||||
|
@ -59635,6 +59706,251 @@
|
||||||
"enumValues": null,
|
"enumValues": null,
|
||||||
"possibleTypes": null
|
"possibleTypes": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"kind": "OBJECT",
|
||||||
|
"name": "SnippetRepositoryRegistry",
|
||||||
|
"description": "Represents the Geo sync and verification state of a snippet repository",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "createdAt",
|
||||||
|
"description": "Timestamp when the SnippetRepositoryRegistry was created",
|
||||||
|
"args": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"type": {
|
||||||
|
"kind": "SCALAR",
|
||||||
|
"name": "Time",
|
||||||
|
"ofType": null
|
||||||
|
},
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"description": "ID of the SnippetRepositoryRegistry",
|
||||||
|
"args": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"type": {
|
||||||
|
"kind": "NON_NULL",
|
||||||
|
"name": null,
|
||||||
|
"ofType": {
|
||||||
|
"kind": "SCALAR",
|
||||||
|
"name": "ID",
|
||||||
|
"ofType": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lastSyncFailure",
|
||||||
|
"description": "Error message during sync of the SnippetRepositoryRegistry",
|
||||||
|
"args": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"type": {
|
||||||
|
"kind": "SCALAR",
|
||||||
|
"name": "String",
|
||||||
|
"ofType": null
|
||||||
|
},
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lastSyncedAt",
|
||||||
|
"description": "Timestamp of the most recent successful sync of the SnippetRepositoryRegistry",
|
||||||
|
"args": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"type": {
|
||||||
|
"kind": "SCALAR",
|
||||||
|
"name": "Time",
|
||||||
|
"ofType": null
|
||||||
|
},
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "retryAt",
|
||||||
|
"description": "Timestamp after which the SnippetRepositoryRegistry should be resynced",
|
||||||
|
"args": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"type": {
|
||||||
|
"kind": "SCALAR",
|
||||||
|
"name": "Time",
|
||||||
|
"ofType": null
|
||||||
|
},
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "retryCount",
|
||||||
|
"description": "Number of consecutive failed sync attempts of the SnippetRepositoryRegistry",
|
||||||
|
"args": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"type": {
|
||||||
|
"kind": "SCALAR",
|
||||||
|
"name": "Int",
|
||||||
|
"ofType": null
|
||||||
|
},
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "snippetRepositoryId",
|
||||||
|
"description": "ID of the Snippet Repository",
|
||||||
|
"args": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"type": {
|
||||||
|
"kind": "NON_NULL",
|
||||||
|
"name": null,
|
||||||
|
"ofType": {
|
||||||
|
"kind": "SCALAR",
|
||||||
|
"name": "ID",
|
||||||
|
"ofType": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "state",
|
||||||
|
"description": "Sync state of the SnippetRepositoryRegistry",
|
||||||
|
"args": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"type": {
|
||||||
|
"kind": "ENUM",
|
||||||
|
"name": "RegistryState",
|
||||||
|
"ofType": null
|
||||||
|
},
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"inputFields": null,
|
||||||
|
"interfaces": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"enumValues": null,
|
||||||
|
"possibleTypes": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kind": "OBJECT",
|
||||||
|
"name": "SnippetRepositoryRegistryConnection",
|
||||||
|
"description": "The connection type for SnippetRepositoryRegistry.",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "edges",
|
||||||
|
"description": "A list of edges.",
|
||||||
|
"args": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"type": {
|
||||||
|
"kind": "LIST",
|
||||||
|
"name": null,
|
||||||
|
"ofType": {
|
||||||
|
"kind": "OBJECT",
|
||||||
|
"name": "SnippetRepositoryRegistryEdge",
|
||||||
|
"ofType": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "nodes",
|
||||||
|
"description": "A list of nodes.",
|
||||||
|
"args": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"type": {
|
||||||
|
"kind": "LIST",
|
||||||
|
"name": null,
|
||||||
|
"ofType": {
|
||||||
|
"kind": "OBJECT",
|
||||||
|
"name": "SnippetRepositoryRegistry",
|
||||||
|
"ofType": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pageInfo",
|
||||||
|
"description": "Information to aid in pagination.",
|
||||||
|
"args": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"type": {
|
||||||
|
"kind": "NON_NULL",
|
||||||
|
"name": null,
|
||||||
|
"ofType": {
|
||||||
|
"kind": "OBJECT",
|
||||||
|
"name": "PageInfo",
|
||||||
|
"ofType": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"inputFields": null,
|
||||||
|
"interfaces": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"enumValues": null,
|
||||||
|
"possibleTypes": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kind": "OBJECT",
|
||||||
|
"name": "SnippetRepositoryRegistryEdge",
|
||||||
|
"description": "An edge in a connection.",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"name": "cursor",
|
||||||
|
"description": "A cursor for use in pagination.",
|
||||||
|
"args": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"type": {
|
||||||
|
"kind": "NON_NULL",
|
||||||
|
"name": null,
|
||||||
|
"ofType": {
|
||||||
|
"kind": "SCALAR",
|
||||||
|
"name": "String",
|
||||||
|
"ofType": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "node",
|
||||||
|
"description": "The item at the end of the edge.",
|
||||||
|
"args": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"type": {
|
||||||
|
"kind": "OBJECT",
|
||||||
|
"name": "SnippetRepositoryRegistry",
|
||||||
|
"ofType": null
|
||||||
|
},
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"inputFields": null,
|
||||||
|
"interfaces": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"enumValues": null,
|
||||||
|
"possibleTypes": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"kind": "ENUM",
|
"kind": "ENUM",
|
||||||
"name": "Sort",
|
"name": "Sort",
|
||||||
|
|
|
@ -1384,6 +1384,7 @@ Autogenerated return type of EpicTreeReorder.
|
||||||
| `selectiveSyncNamespaces` | NamespaceConnection | The namespaces that should be synced, if `selective_sync_type` == `namespaces` |
|
| `selectiveSyncNamespaces` | NamespaceConnection | The namespaces that should be synced, if `selective_sync_type` == `namespaces` |
|
||||||
| `selectiveSyncShards` | String! => Array | The repository storages whose projects should be synced, if `selective_sync_type` == `shards` |
|
| `selectiveSyncShards` | String! => Array | The repository storages whose projects should be synced, if `selective_sync_type` == `shards` |
|
||||||
| `selectiveSyncType` | String | Indicates if syncing is limited to only specific groups, or shards |
|
| `selectiveSyncType` | String | Indicates if syncing is limited to only specific groups, or shards |
|
||||||
|
| `snippetRepositoryRegistries` | SnippetRepositoryRegistryConnection | Find snippet repository registries on this Geo node. Available only when feature flag `geo_snippet_repository_replication` is enabled |
|
||||||
| `syncObjectStorage` | Boolean | Indicates if this secondary node will replicate blobs in Object Storage |
|
| `syncObjectStorage` | Boolean | Indicates if this secondary node will replicate blobs in Object Storage |
|
||||||
| `terraformStateVersionRegistries` | TerraformStateVersionRegistryConnection | Find terraform state version registries on this Geo node |
|
| `terraformStateVersionRegistries` | TerraformStateVersionRegistryConnection | Find terraform state version registries on this Geo node |
|
||||||
| `url` | String | The user-facing URL for this Geo node |
|
| `url` | String | The user-facing URL for this Geo node |
|
||||||
|
@ -2990,6 +2991,21 @@ Represents how the blob content should be displayed.
|
||||||
| `reportSnippet` | Boolean! | Indicates the user can perform `report_snippet` on this resource |
|
| `reportSnippet` | Boolean! | Indicates the user can perform `report_snippet` on this resource |
|
||||||
| `updateSnippet` | Boolean! | Indicates the user can perform `update_snippet` on this resource |
|
| `updateSnippet` | Boolean! | Indicates the user can perform `update_snippet` on this resource |
|
||||||
|
|
||||||
|
### SnippetRepositoryRegistry
|
||||||
|
|
||||||
|
Represents the Geo sync and verification state of a snippet repository.
|
||||||
|
|
||||||
|
| Field | Type | Description |
|
||||||
|
| ----- | ---- | ----------- |
|
||||||
|
| `createdAt` | Time | Timestamp when the SnippetRepositoryRegistry was created |
|
||||||
|
| `id` | ID! | ID of the SnippetRepositoryRegistry |
|
||||||
|
| `lastSyncFailure` | String | Error message during sync of the SnippetRepositoryRegistry |
|
||||||
|
| `lastSyncedAt` | Time | Timestamp of the most recent successful sync of the SnippetRepositoryRegistry |
|
||||||
|
| `retryAt` | Time | Timestamp after which the SnippetRepositoryRegistry should be resynced |
|
||||||
|
| `retryCount` | Int | Number of consecutive failed sync attempts of the SnippetRepositoryRegistry |
|
||||||
|
| `snippetRepositoryId` | ID! | ID of the Snippet Repository |
|
||||||
|
| `state` | RegistryState | Sync state of the SnippetRepositoryRegistry |
|
||||||
|
|
||||||
### StatusAction
|
### StatusAction
|
||||||
|
|
||||||
| Field | Type | Description |
|
| Field | Type | Description |
|
||||||
|
|
|
@ -249,7 +249,7 @@ pipeline to include running the tests along with the existing build job.
|
||||||
|
|
||||||
## Continuous Integration
|
## Continuous Integration
|
||||||
|
|
||||||
To ensure our changes don't break the build and all tests still pass, we utilize
|
To ensure our changes don't break the build and all tests still pass, we use
|
||||||
Continuous Integration (CI) to run these checks automatically for every push.
|
Continuous Integration (CI) to run these checks automatically for every push.
|
||||||
Read through this article to understand [Continuous Integration, Continuous Delivery, and Continuous Deployment](https://about.gitlab.com/blog/2016/08/05/continuous-integration-delivery-and-deployment-with-gitlab/),
|
Read through this article to understand [Continuous Integration, Continuous Delivery, and Continuous Deployment](https://about.gitlab.com/blog/2016/08/05/continuous-integration-delivery-and-deployment-with-gitlab/),
|
||||||
and how these methods are leveraged by GitLab.
|
and how these methods are leveraged by GitLab.
|
||||||
|
|
|
@ -17,7 +17,7 @@ You can configure your job to use custom Metrics Reports, and GitLab will displa
|
||||||
|
|
||||||
## Use cases
|
## Use cases
|
||||||
|
|
||||||
Consider the following examples of data that can utilize Metrics Reports:
|
Consider the following examples of data that can use Metrics Reports:
|
||||||
|
|
||||||
1. Memory usage
|
1. Memory usage
|
||||||
1. Load testing results
|
1. Load testing results
|
||||||
|
|
|
@ -14,9 +14,6 @@ includes a few key metrics, but you can also define your own custom dashboards.
|
||||||
You may create a [new dashboard from scratch](#add-a-new-dashboard-to-your-project)
|
You may create a [new dashboard from scratch](#add-a-new-dashboard-to-your-project)
|
||||||
or [duplicate a GitLab-defined Prometheus dashboard](#duplicate-a-gitlab-defined-dashboard).
|
or [duplicate a GitLab-defined Prometheus dashboard](#duplicate-a-gitlab-defined-dashboard).
|
||||||
|
|
||||||
The metrics as defined below do not support alerts, unlike
|
|
||||||
[custom metrics](../index.md#adding-custom-metrics).
|
|
||||||
|
|
||||||
## Add a new dashboard to your project
|
## Add a new dashboard to your project
|
||||||
|
|
||||||
> UI option [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/228856) in GitLab 13.3.
|
> UI option [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/228856) in GitLab 13.3.
|
||||||
|
|
|
@ -158,7 +158,7 @@ module Gitlab
|
||||||
|
|
||||||
if Service.available_services_names.include?(underscored_service)
|
if Service.available_services_names.include?(underscored_service)
|
||||||
# We treat underscored_service as a trusted input because it is included
|
# We treat underscored_service as a trusted input because it is included
|
||||||
# in the Service.available_services_names whitelist.
|
# in the Service.available_services_names allowlist.
|
||||||
service = project.public_send("#{underscored_service}_service") # rubocop:disable GitlabSecurity/PublicSend
|
service = project.public_send("#{underscored_service}_service") # rubocop:disable GitlabSecurity/PublicSend
|
||||||
|
|
||||||
if service && service.activated? && service.valid_token?(password)
|
if service && service.activated? && service.valid_token?(password)
|
||||||
|
|
|
@ -75,14 +75,13 @@ fi
|
||||||
function run_locally_or_in_docker() {
|
function run_locally_or_in_docker() {
|
||||||
local cmd=$1
|
local cmd=$1
|
||||||
local args=$2
|
local args=$2
|
||||||
local pipe_cmd=$3
|
|
||||||
|
|
||||||
if hash ${cmd} 2>/dev/null
|
if hash ${cmd} 2>/dev/null
|
||||||
then
|
then
|
||||||
$cmd $args | $pipe_cmd
|
$cmd $args
|
||||||
elif hash docker 2>/dev/null
|
elif hash docker 2>/dev/null
|
||||||
then
|
then
|
||||||
docker run -t -v ${PWD}:/gitlab -w /gitlab --rm registry.gitlab.com/gitlab-org/gitlab-docs/lint:latest ${cmd} ${args} | $pipe_cmd
|
docker run -t -v ${PWD}:/gitlab -w /gitlab --rm registry.gitlab.com/gitlab-org/gitlab-docs/lint-markdown:alpine-3.12-vale-2.6.1-markdownlint-0.24.0 ${cmd} ${args}
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
echo " ✖ ERROR: '${cmd}' not found. Install '${cmd}' or Docker to proceed." >&2
|
echo " ✖ ERROR: '${cmd}' not found. Install '${cmd}' or Docker to proceed." >&2
|
||||||
|
@ -109,7 +108,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo '=> Linting prose...'
|
echo '=> Linting prose...'
|
||||||
run_locally_or_in_docker 'vale' "--minAlertLevel error --output=JSON ${MD_DOC_PATH}" "ruby scripts/vale.rb"
|
run_locally_or_in_docker 'vale' "--minAlertLevel error --output=doc/.vale/vale.tmpl ${MD_DOC_PATH}"
|
||||||
|
|
||||||
if [ $ERRORCODE -ne 0 ]
|
if [ $ERRORCODE -ne 0 ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
#
|
|
||||||
# Get the JSON output from Vale and format it in a nicer way
|
|
||||||
# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46725
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
# vale --output=JSON filename.md | ruby vale.rb
|
|
||||||
#
|
|
||||||
|
|
||||||
require 'json'
|
|
||||||
|
|
||||||
input = ARGF.read
|
|
||||||
data = JSON.parse(input)
|
|
||||||
|
|
||||||
data.each_pair do |source, alerts|
|
|
||||||
alerts.each do |alert|
|
|
||||||
puts "#{source}:"
|
|
||||||
puts " Line #{alert['Line']}, position #{alert['Span'][0]} (rule #{alert['Check']})"
|
|
||||||
puts " #{alert['Severity']}: #{alert['Message']}"
|
|
||||||
puts " More information: #{alert['Link']}"
|
|
||||||
puts
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -46,7 +46,7 @@ RSpec.describe Groups::Settings::IntegrationsController do
|
||||||
describe '#edit' do
|
describe '#edit' do
|
||||||
context 'when user is not owner' do
|
context 'when user is not owner' do
|
||||||
it 'renders not_found' do
|
it 'renders not_found' do
|
||||||
get :edit, params: { group_id: group, id: Service.available_services_names.sample }
|
get :edit, params: { group_id: group, id: Service.available_services_names(include_project_specific: false).sample }
|
||||||
|
|
||||||
expect(response).to have_gitlab_http_status(:not_found)
|
expect(response).to have_gitlab_http_status(:not_found)
|
||||||
end
|
end
|
||||||
|
@ -61,13 +61,13 @@ RSpec.describe Groups::Settings::IntegrationsController do
|
||||||
it 'returns not_found' do
|
it 'returns not_found' do
|
||||||
stub_feature_flags(group_level_integrations: false)
|
stub_feature_flags(group_level_integrations: false)
|
||||||
|
|
||||||
get :edit, params: { group_id: group, id: Service.available_services_names.sample }
|
get :edit, params: { group_id: group, id: Service.available_services_names(include_project_specific: false).sample }
|
||||||
|
|
||||||
expect(response).to have_gitlab_http_status(:not_found)
|
expect(response).to have_gitlab_http_status(:not_found)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Service.available_services_names.each do |integration_name|
|
Service.available_services_names(include_project_specific: false).each do |integration_name|
|
||||||
context "#{integration_name}" do
|
context "#{integration_name}" do
|
||||||
it 'successfully displays the template' do
|
it 'successfully displays the template' do
|
||||||
get :edit, params: { group_id: group, id: integration_name }
|
get :edit, params: { group_id: group, id: integration_name }
|
||||||
|
|
|
@ -11,5 +11,5 @@ RSpec.describe GitlabSchema.types['ServiceType'] do
|
||||||
end
|
end
|
||||||
|
|
||||||
def available_services_enum
|
def available_services_enum
|
||||||
::Service.services_types.map(&:underscore).map(&:upcase)
|
::Service.available_services_types(include_dev: false).map(&:underscore).map(&:upcase)
|
||||||
end
|
end
|
||||||
|
|
|
@ -5551,15 +5551,16 @@ RSpec.describe Project, factory_default: :keep do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#find_or_initialize_services' do
|
describe '#find_or_initialize_services' do
|
||||||
it 'returns only enabled services' do
|
before do
|
||||||
allow(Service).to receive(:available_services_names).and_return(%w[prometheus pushover teamcity])
|
allow(Service).to receive(:available_services_names).and_return(%w[prometheus pushover teamcity])
|
||||||
allow(Service).to receive(:project_specific_services_names).and_return(%w[asana])
|
|
||||||
allow(subject).to receive(:disabled_services).and_return(%w[prometheus])
|
allow(subject).to receive(:disabled_services).and_return(%w[prometheus])
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'returns only enabled services' do
|
||||||
services = subject.find_or_initialize_services
|
services = subject.find_or_initialize_services
|
||||||
|
|
||||||
expect(services.count).to eq(3)
|
expect(services.count).to eq(2)
|
||||||
expect(services.map(&:title)).to eq(['Asana', 'JetBrains TeamCity CI', 'Pushover'])
|
expect(services.map(&:title)).to eq(['JetBrains TeamCity CI', 'Pushover'])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -208,27 +208,27 @@ RSpec.describe Service do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '.find_or_initialize_integration' do
|
describe '.find_or_initialize_non_project_specific_integration' do
|
||||||
let!(:service1) { create(:jira_service, project_id: nil, group_id: group.id) }
|
let!(:service1) { create(:jira_service, project_id: nil, group_id: group.id) }
|
||||||
let!(:service2) { create(:jira_service) }
|
let!(:service2) { create(:jira_service) }
|
||||||
|
|
||||||
it 'returns the right service' do
|
it 'returns the right service' do
|
||||||
expect(Service.find_or_initialize_integration('jira', group_id: group)).to eq(service1)
|
expect(Service.find_or_initialize_non_project_specific_integration('jira', group_id: group)).to eq(service1)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'does not create a new service' do
|
it 'does not create a new service' do
|
||||||
expect { Service.find_or_initialize_integration('redmine', group_id: group) }.not_to change { Service.count }
|
expect { Service.find_or_initialize_non_project_specific_integration('redmine', group_id: group) }.not_to change { Service.count }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '.find_or_initialize_all' do
|
describe '.find_or_initialize_all_non_project_specific' do
|
||||||
shared_examples 'service instances' do
|
shared_examples 'service instances' do
|
||||||
it 'returns the available service instances' do
|
it 'returns the available service instances' do
|
||||||
expect(Service.find_or_initialize_all(Service.for_instance).pluck(:type)).to match_array(Service.available_services_types)
|
expect(Service.find_or_initialize_all_non_project_specific(Service.for_instance).pluck(:type)).to match_array(Service.available_services_types(include_project_specific: false))
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'does not create service instances' do
|
it 'does not create service instances' do
|
||||||
expect { Service.find_or_initialize_all(Service.for_instance) }.not_to change { Service.count }
|
expect { Service.find_or_initialize_all_non_project_specific(Service.for_instance) }.not_to change { Service.count }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ RSpec.describe Service do
|
||||||
context 'with all existing instances' do
|
context 'with all existing instances' do
|
||||||
before do
|
before do
|
||||||
Service.insert_all(
|
Service.insert_all(
|
||||||
Service.available_services_types.map { |type| { instance: true, type: type } }
|
Service.available_services_types(include_project_specific: false).map { |type| { instance: true, type: type } }
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -265,13 +265,13 @@ RSpec.describe Service do
|
||||||
describe 'template' do
|
describe 'template' do
|
||||||
shared_examples 'retrieves service templates' do
|
shared_examples 'retrieves service templates' do
|
||||||
it 'returns the available service templates' do
|
it 'returns the available service templates' do
|
||||||
expect(Service.find_or_create_templates.pluck(:type)).to match_array(Service.available_services_types)
|
expect(Service.find_or_create_templates.pluck(:type)).to match_array(Service.available_services_types(include_project_specific: false))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '.find_or_create_templates' do
|
describe '.find_or_create_templates' do
|
||||||
it 'creates service templates' do
|
it 'creates service templates' do
|
||||||
expect { Service.find_or_create_templates }.to change { Service.count }.from(0).to(Service.available_services_names.size)
|
expect { Service.find_or_create_templates }.to change { Service.count }.from(0).to(Service.available_services_names(include_project_specific: false).size)
|
||||||
end
|
end
|
||||||
|
|
||||||
it_behaves_like 'retrieves service templates'
|
it_behaves_like 'retrieves service templates'
|
||||||
|
@ -279,7 +279,7 @@ RSpec.describe Service do
|
||||||
context 'with all existing templates' do
|
context 'with all existing templates' do
|
||||||
before do
|
before do
|
||||||
Service.insert_all(
|
Service.insert_all(
|
||||||
Service.available_services_types.map { |type| { template: true, type: type } }
|
Service.available_services_types(include_project_specific: false).map { |type| { template: true, type: type } }
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ RSpec.describe Service do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'creates the rest of the service templates' do
|
it 'creates the rest of the service templates' do
|
||||||
expect { Service.find_or_create_templates }.to change { Service.count }.from(1).to(Service.available_services_names.size)
|
expect { Service.find_or_create_templates }.to change { Service.count }.from(1).to(Service.available_services_names(include_project_specific: false).size)
|
||||||
end
|
end
|
||||||
|
|
||||||
it_behaves_like 'retrieves service templates'
|
it_behaves_like 'retrieves service templates'
|
||||||
|
@ -891,4 +891,30 @@ RSpec.describe Service do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '.available_services_names' do
|
||||||
|
it 'calls the right methods' do
|
||||||
|
expect(described_class).to receive(:services_names).and_call_original
|
||||||
|
expect(described_class).to receive(:dev_services_names).and_call_original
|
||||||
|
expect(described_class).to receive(:project_specific_services_names).and_call_original
|
||||||
|
|
||||||
|
described_class.available_services_names
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'does not call project_specific_services_names with include_project_specific false' do
|
||||||
|
expect(described_class).to receive(:services_names).and_call_original
|
||||||
|
expect(described_class).to receive(:dev_services_names).and_call_original
|
||||||
|
expect(described_class).not_to receive(:project_specific_services_names)
|
||||||
|
|
||||||
|
described_class.available_services_names(include_project_specific: false)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'does not call dev_services_names with include_dev false' do
|
||||||
|
expect(described_class).to receive(:services_names).and_call_original
|
||||||
|
expect(described_class).not_to receive(:dev_services_names)
|
||||||
|
expect(described_class).to receive(:project_specific_services_names).and_call_original
|
||||||
|
|
||||||
|
described_class.available_services_names(include_dev: false)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue