Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
9445257afe
commit
bc89c8dcb1
2
Gemfile
2
Gemfile
|
|
@ -531,7 +531,7 @@ group :test do
|
|||
gem 'gitlab_quality-test_tooling', '~> 1.21.1', require: false, feature_category: :tooling
|
||||
end
|
||||
|
||||
gem 'octokit', '~> 8.0', feature_category: :importers
|
||||
gem 'octokit', '~> 8.1', feature_category: :importers
|
||||
|
||||
gem 'gitlab-mail_room', '~> 0.0.24', require: 'mail_room', feature_category: :shared
|
||||
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@
|
|||
{"name":"numerizer","version":"0.2.0","platform":"ruby","checksum":"e58076d5ee5370417b7e52d9cb25836d62acd1b8d9a194c308707986c1705d7b"},
|
||||
{"name":"oauth","version":"0.5.6","platform":"ruby","checksum":"4085fe28e0c5e2434135e00a6555294fd2a4ff96a98d1bdecdcd619fc6368dff"},
|
||||
{"name":"oauth2","version":"2.0.9","platform":"ruby","checksum":"b21f9defcf52dc1610e0dfab4c868342173dcd707fd15c777d9f4f04e153f7fb"},
|
||||
{"name":"octokit","version":"8.0.0","platform":"ruby","checksum":"c362be3ee7cd2f01f5af98c06b182587fbe4ae57c2385cdf94a1b04154d8d085"},
|
||||
{"name":"octokit","version":"8.1.0","platform":"ruby","checksum":"82229ce9b54e910e27ae75ff21e54bc97072913b5af06750999966e6817af8cd"},
|
||||
{"name":"ohai","version":"18.1.3","platform":"ruby","checksum":"980cfd6a6597f897e157532ba2168d29afb83a8f5e125f682ec3248c3407df95"},
|
||||
{"name":"oj","version":"3.13.23","platform":"ruby","checksum":"206dfdc4020ad9974705037f269cfba211d61b7662a58c717cce771829ccef51"},
|
||||
{"name":"oj-introspect","version":"0.7.2","platform":"ruby","checksum":"c415a44567ed2870d8e963a69421d9322128e194fab7867e37e54d5a25d5333d"},
|
||||
|
|
|
|||
|
|
@ -1157,7 +1157,8 @@ GEM
|
|||
rack (>= 1.2, < 4)
|
||||
snaky_hash (~> 2.0)
|
||||
version_gem (~> 1.1)
|
||||
octokit (8.0.0)
|
||||
octokit (8.1.0)
|
||||
base64
|
||||
faraday (>= 1, < 3)
|
||||
sawyer (~> 0.9)
|
||||
ohai (18.1.3)
|
||||
|
|
@ -2013,7 +2014,7 @@ DEPENDENCIES
|
|||
net-protocol (~> 0.1.3)
|
||||
nokogiri (~> 1.16)
|
||||
oauth2 (~> 2.0)
|
||||
octokit (~> 8.0)
|
||||
octokit (~> 8.1)
|
||||
ohai (~> 18.1)
|
||||
oj (~> 3.13.21)
|
||||
oj-introspect (~> 0.7)
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ export const I18N = {
|
|||
deleteRule: s__('BranchRules|Delete rule'),
|
||||
manageProtectionsLinkTitle: s__('BranchRules|Manage in protected branches'),
|
||||
targetBranch: s__('BranchRules|Target branch'),
|
||||
ruleTarget: s__('BranchRules|Rule target'),
|
||||
branchNameOrPattern: s__('BranchRules|Branch name or pattern'),
|
||||
branch: s__('BranchRules|Target branch'),
|
||||
allBranches: s__('BranchRules|All branches'),
|
||||
matchingBranchesLinkTitle: s__('BranchRules|%{total} matching %{subject}'),
|
||||
protectBranchTitle: s__('BranchRules|Protect branch'),
|
||||
|
|
@ -45,7 +45,6 @@ export const I18N = {
|
|||
'BranchRules|Are you sure you want to delete this branch rule? This action cannot be undone.',
|
||||
),
|
||||
deleteRuleModalDeleteText: s__('BranchRules|Delete branch rule'),
|
||||
targetRule: s__('BranchRules|Target branch'),
|
||||
updateTargetRule: s__('BranchRules|Update target branch'),
|
||||
update: s__('BranchRules|Update'),
|
||||
edit: s__('BranchRules|Edit'),
|
||||
|
|
|
|||
|
|
@ -162,14 +162,6 @@ export default {
|
|||
allBranches() {
|
||||
return this.branch === ALL_BRANCHES_WILDCARD;
|
||||
},
|
||||
allBranchesLabel() {
|
||||
return this.$options.i18n.allBranches;
|
||||
},
|
||||
branchTitle() {
|
||||
return this.allBranches
|
||||
? this.$options.i18n.targetBranch
|
||||
: this.$options.i18n.branchNameOrPattern;
|
||||
},
|
||||
matchingBranchesLinkHref() {
|
||||
return mergeUrlParams({ state: 'all', search: `^${this.branch}$` }, this.branchesPath);
|
||||
},
|
||||
|
|
@ -237,42 +229,45 @@ export default {
|
|||
<template>
|
||||
<div>
|
||||
<div class="gl-display-flex gl-justify-content-space-between gl-align-items-center">
|
||||
<h3 class="gl-mb-5">{{ $options.i18n.pageTitle }}</h3>
|
||||
<h1 class="h3 gl-mb-5">{{ $options.i18n.pageTitle }}</h1>
|
||||
<gl-button
|
||||
v-if="glFeatures.editBranchRules && branchRule"
|
||||
v-gl-modal="$options.deleteModalId"
|
||||
data-testid="delete-rule-button"
|
||||
category="secondary"
|
||||
variant="danger"
|
||||
:disabled="$apollo.loading"
|
||||
>{{ $options.i18n.deleteRule }}
|
||||
</gl-button>
|
||||
</div>
|
||||
<gl-loading-icon v-if="$apollo.loading" />
|
||||
<gl-loading-icon v-if="$apollo.loading" size="lg" />
|
||||
<div v-else-if="!branchRule">{{ $options.i18n.noData }}</div>
|
||||
<div v-else>
|
||||
<gl-card>
|
||||
<gl-card
|
||||
class="gl-new-card"
|
||||
header-class="gl-new-card-header"
|
||||
body-class="gl-new-card-body gl-p-5"
|
||||
>
|
||||
<template #header>
|
||||
<div class="gl-display-flex gl-justify-content-space-between">
|
||||
<strong>{{ $options.i18n.targetRule }}</strong>
|
||||
<gl-button
|
||||
v-if="glFeatures.addBranchRule || glFeatures.editBranchRules"
|
||||
v-gl-modal="$options.editModalId"
|
||||
data-testid="edit-rule-button"
|
||||
size="small"
|
||||
>{{ $options.i18n.edit }}</gl-button
|
||||
>
|
||||
</div>
|
||||
<strong>{{ $options.i18n.ruleTarget }}</strong>
|
||||
<gl-button
|
||||
v-if="glFeatures.addBranchRule || glFeatures.editBranchRules"
|
||||
v-gl-modal="$options.editModalId"
|
||||
data-testid="edit-rule-button"
|
||||
size="small"
|
||||
>{{ $options.i18n.edit }}</gl-button
|
||||
>
|
||||
</template>
|
||||
<div v-if="allBranches" class="gl-mt-2" data-testid="all-branches">
|
||||
{{ allBranchesLabel }}
|
||||
{{ $options.i18n.allBranches }}
|
||||
</div>
|
||||
<code v-else class="gl-mt-2" data-testid="branch">{{ branch }}</code>
|
||||
<code v-else class="gl-bg-none p-0 gl-font-base" data-testid="branch">{{ branch }}</code>
|
||||
<p v-if="matchingBranchesCount" class="gl-mt-3 gl-mb-0">
|
||||
<gl-link :href="matchingBranchesLinkHref">{{ matchingBranchesLinkTitle }}</gl-link>
|
||||
</p>
|
||||
</gl-card>
|
||||
|
||||
<h4 class="gl-mb-1 gl-mt-5">{{ $options.i18n.protectBranchTitle }}</h4>
|
||||
<h2 class="h4 gl-mb-1 gl-mt-5">{{ $options.i18n.protectBranchTitle }}</h2>
|
||||
<gl-sprintf :message="$options.i18n.protectBranchDescription">
|
||||
<template #link="{ content }">
|
||||
<gl-link :href="$options.protectedBranchesHelpDocLink">
|
||||
|
|
@ -280,121 +275,121 @@ export default {
|
|||
</gl-link>
|
||||
</template>
|
||||
</gl-sprintf>
|
||||
</div>
|
||||
|
||||
<!-- Allowed to push -->
|
||||
<protection
|
||||
class="gl-mt-3"
|
||||
:header="allowedToPushHeader"
|
||||
:header-link-title="$options.i18n.manageProtectionsLinkTitle"
|
||||
:header-link-href="protectedBranchesPath"
|
||||
:roles="pushAccessLevels.roles"
|
||||
:users="pushAccessLevels.users"
|
||||
:groups="pushAccessLevels.groups"
|
||||
data-testid="allowed-to-push-content"
|
||||
/>
|
||||
|
||||
<!-- Allowed to merge -->
|
||||
<protection
|
||||
:header="allowedToMergeHeader"
|
||||
:header-link-title="$options.i18n.manageProtectionsLinkTitle"
|
||||
:header-link-href="protectedBranchesPath"
|
||||
:roles="mergeAccessLevels.roles"
|
||||
:users="mergeAccessLevels.users"
|
||||
:groups="mergeAccessLevels.groups"
|
||||
data-testid="allowed-to-merge-content"
|
||||
/>
|
||||
|
||||
<!-- Force push -->
|
||||
<div class="gl-display-flex gl-align-items-center">
|
||||
<gl-icon
|
||||
:size="14"
|
||||
data-testid="force-push-icon"
|
||||
:name="forcePushAttributes.icon"
|
||||
:class="forcePushAttributes.iconClass"
|
||||
/>
|
||||
<strong class="gl-ml-2">{{ forcePushAttributes.title }}</strong>
|
||||
</div>
|
||||
|
||||
<div class="gl-text-gray-400 gl-mb-2">{{ $options.i18n.forcePushDescription }}</div>
|
||||
|
||||
<!-- EE start -->
|
||||
<!-- Code Owners -->
|
||||
<div v-if="showCodeOwners">
|
||||
<div class="gl-display-flex gl-align-items-center">
|
||||
<gl-icon
|
||||
data-testid="code-owners-icon"
|
||||
:size="14"
|
||||
:name="codeOwnersApprovalAttributes.icon"
|
||||
:class="codeOwnersApprovalAttributes.iconClass"
|
||||
/>
|
||||
<strong class="gl-ml-2">{{ codeOwnersApprovalAttributes.title }}</strong>
|
||||
</div>
|
||||
|
||||
<div class="gl-text-gray-400">{{ codeOwnersApprovalAttributes.description }}</div>
|
||||
</div>
|
||||
|
||||
<!-- Approvals -->
|
||||
<template v-if="showApprovers">
|
||||
<h4 class="gl-mb-1 gl-mt-5">{{ $options.i18n.approvalsTitle }}</h4>
|
||||
<gl-sprintf :message="$options.i18n.approvalsDescription">
|
||||
<template #link="{ content }">
|
||||
<gl-link :href="$options.approvalsHelpDocLink">
|
||||
{{ content }}
|
||||
</gl-link>
|
||||
</template>
|
||||
</gl-sprintf>
|
||||
|
||||
<approval-rules-app
|
||||
:is-mr-edit="false"
|
||||
:is-branch-rules-edit="true"
|
||||
@submitted="$apollo.queries.project.refetch()"
|
||||
>
|
||||
<template #rules>
|
||||
<project-rules :is-branch-rules-edit="true" />
|
||||
</template>
|
||||
</approval-rules-app>
|
||||
</template>
|
||||
|
||||
<!-- Status checks -->
|
||||
<template v-if="showStatusChecks">
|
||||
<h4 class="gl-mb-1 gl-mt-5">{{ $options.i18n.statusChecksTitle }}</h4>
|
||||
<gl-sprintf :message="$options.i18n.statusChecksDescription">
|
||||
<template #link="{ content }">
|
||||
<gl-link :href="$options.statusChecksHelpDocLink">
|
||||
{{ content }}
|
||||
</gl-link>
|
||||
</template>
|
||||
</gl-sprintf>
|
||||
|
||||
<!-- Allowed to push -->
|
||||
<protection
|
||||
class="gl-mt-3"
|
||||
:header="statusChecksHeader"
|
||||
:header-link-title="$options.i18n.statusChecksLinkTitle"
|
||||
:header-link-href="statusChecksPath"
|
||||
:status-checks="statusChecks"
|
||||
:header="allowedToPushHeader"
|
||||
:header-link-title="$options.i18n.manageProtectionsLinkTitle"
|
||||
:header-link-href="protectedBranchesPath"
|
||||
:roles="pushAccessLevels.roles"
|
||||
:users="pushAccessLevels.users"
|
||||
:groups="pushAccessLevels.groups"
|
||||
data-testid="allowed-to-push-content"
|
||||
/>
|
||||
</template>
|
||||
<!-- EE end -->
|
||||
<gl-modal
|
||||
v-if="glFeatures.editBranchRules"
|
||||
:ref="$options.deleteModalId"
|
||||
:modal-id="$options.deleteModalId"
|
||||
:title="$options.i18n.deleteRuleModalTitle"
|
||||
:ok-title="$options.i18n.deleteRuleModalDeleteText"
|
||||
ok-variant="danger"
|
||||
@ok="deleteBranchRule"
|
||||
>
|
||||
<p>{{ $options.i18n.deleteRuleModalText }}</p>
|
||||
</gl-modal>
|
||||
|
||||
<branch-rule-modal
|
||||
v-if="glFeatures.editBranchRules"
|
||||
:id="$options.editModalId"
|
||||
:ref="$options.editModalId"
|
||||
:title="$options.i18n.updateTargetRule"
|
||||
:action-primary-text="$options.i18n.update"
|
||||
@primary="editBranchRule({ name: $event })"
|
||||
/>
|
||||
<!-- Allowed to merge -->
|
||||
<protection
|
||||
:header="allowedToMergeHeader"
|
||||
:header-link-title="$options.i18n.manageProtectionsLinkTitle"
|
||||
:header-link-href="protectedBranchesPath"
|
||||
:roles="mergeAccessLevels.roles"
|
||||
:users="mergeAccessLevels.users"
|
||||
:groups="mergeAccessLevels.groups"
|
||||
data-testid="allowed-to-merge-content"
|
||||
/>
|
||||
|
||||
<!-- Force push -->
|
||||
<div class="gl-display-flex gl-align-items-center">
|
||||
<gl-icon
|
||||
:size="14"
|
||||
data-testid="force-push-icon"
|
||||
:name="forcePushAttributes.icon"
|
||||
:class="forcePushAttributes.iconClass"
|
||||
/>
|
||||
<strong class="gl-ml-2">{{ forcePushAttributes.title }}</strong>
|
||||
</div>
|
||||
|
||||
<div class="gl-text-gray-400 gl-mb-2">{{ $options.i18n.forcePushDescription }}</div>
|
||||
|
||||
<!-- EE start -->
|
||||
<!-- Code Owners -->
|
||||
<div v-if="showCodeOwners">
|
||||
<div class="gl-display-flex gl-align-items-center">
|
||||
<gl-icon
|
||||
data-testid="code-owners-icon"
|
||||
:size="14"
|
||||
:name="codeOwnersApprovalAttributes.icon"
|
||||
:class="codeOwnersApprovalAttributes.iconClass"
|
||||
/>
|
||||
<strong class="gl-ml-2">{{ codeOwnersApprovalAttributes.title }}</strong>
|
||||
</div>
|
||||
|
||||
<div class="gl-text-gray-400">{{ codeOwnersApprovalAttributes.description }}</div>
|
||||
</div>
|
||||
|
||||
<!-- Approvals -->
|
||||
<template v-if="showApprovers">
|
||||
<h2 class="h4 gl-mb-1 gl-mt-5">{{ $options.i18n.approvalsTitle }}</h2>
|
||||
<gl-sprintf :message="$options.i18n.approvalsDescription">
|
||||
<template #link="{ content }">
|
||||
<gl-link :href="$options.approvalsHelpDocLink">
|
||||
{{ content }}
|
||||
</gl-link>
|
||||
</template>
|
||||
</gl-sprintf>
|
||||
|
||||
<approval-rules-app
|
||||
:is-mr-edit="false"
|
||||
:is-branch-rules-edit="true"
|
||||
@submitted="$apollo.queries.project.refetch()"
|
||||
>
|
||||
<template #rules>
|
||||
<project-rules :is-branch-rules-edit="true" />
|
||||
</template>
|
||||
</approval-rules-app>
|
||||
</template>
|
||||
|
||||
<!-- Status checks -->
|
||||
<template v-if="showStatusChecks">
|
||||
<h2 class="h4 gl-mb-1 gl-mt-5">{{ $options.i18n.statusChecksTitle }}</h2>
|
||||
<gl-sprintf :message="$options.i18n.statusChecksDescription">
|
||||
<template #link="{ content }">
|
||||
<gl-link :href="$options.statusChecksHelpDocLink">
|
||||
{{ content }}
|
||||
</gl-link>
|
||||
</template>
|
||||
</gl-sprintf>
|
||||
|
||||
<protection
|
||||
class="gl-mt-3"
|
||||
:header="statusChecksHeader"
|
||||
:header-link-title="$options.i18n.statusChecksLinkTitle"
|
||||
:header-link-href="statusChecksPath"
|
||||
:status-checks="statusChecks"
|
||||
/>
|
||||
</template>
|
||||
<!-- EE end -->
|
||||
<gl-modal
|
||||
v-if="glFeatures.editBranchRules"
|
||||
:ref="$options.deleteModalId"
|
||||
:modal-id="$options.deleteModalId"
|
||||
:title="$options.i18n.deleteRuleModalTitle"
|
||||
:ok-title="$options.i18n.deleteRuleModalDeleteText"
|
||||
ok-variant="danger"
|
||||
@ok="deleteBranchRule"
|
||||
>
|
||||
<p>{{ $options.i18n.deleteRuleModalText }}</p>
|
||||
</gl-modal>
|
||||
|
||||
<branch-rule-modal
|
||||
v-if="glFeatures.editBranchRules"
|
||||
:id="$options.editModalId"
|
||||
:ref="$options.editModalId"
|
||||
:title="$options.i18n.updateTargetRule"
|
||||
:action-primary-text="$options.i18n.update"
|
||||
@primary="editBranchRule({ name: $event })"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -64,12 +64,14 @@ export default {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<gl-card class="gl-mb-5" body-class="gl-py-0">
|
||||
<gl-card
|
||||
class="gl-new-card gl-mb-5"
|
||||
header-class="gl-new-card-header"
|
||||
body-class="gl-new-card-body gl-px-5"
|
||||
>
|
||||
<template #header>
|
||||
<div class="gl-display-flex gl-justify-content-space-between">
|
||||
<strong>{{ header }}</strong>
|
||||
<gl-link :href="headerLinkHref">{{ headerLinkTitle }}</gl-link>
|
||||
</div>
|
||||
<strong>{{ header }}</strong>
|
||||
<gl-link :href="headerLinkHref">{{ headerLinkTitle }}</gl-link>
|
||||
</template>
|
||||
|
||||
<!-- Roles -->
|
||||
|
|
|
|||
|
|
@ -94,7 +94,12 @@ export default {
|
|||
:href="avatar.webUrl"
|
||||
:title="avatar.name"
|
||||
>
|
||||
<gl-avatar :src="avatar.avatarUrl" :label="avatar.name" :size="$options.AVATAR_SIZE" />
|
||||
<gl-avatar
|
||||
:src="avatar.avatarUrl"
|
||||
:label="avatar.name"
|
||||
:alt="avatar.name"
|
||||
:size="$options.AVATAR_SIZE"
|
||||
/>
|
||||
</gl-avatar-link>
|
||||
</template>
|
||||
</gl-avatars-inline>
|
||||
|
|
|
|||
|
|
@ -539,9 +539,29 @@ table.code {
|
|||
}
|
||||
|
||||
.line_holder:last-of-type {
|
||||
.diff-td:first-child,
|
||||
td:first-child {
|
||||
border-bottom-left-radius: $border-radius-default - 1px;
|
||||
.diff-grid-left {
|
||||
.diff-td:first-child,
|
||||
td:first-child {
|
||||
border-bottom-left-radius: $border-radius-default - 1px;
|
||||
|
||||
.diff-line-expand-button {
|
||||
border-bottom-left-radius: $border-radius-default - 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.diff-td:last-child:not(.left-side.parallel),
|
||||
td:last-child:not(.left-side.parallel) {
|
||||
border-bottom-right-radius: $border-radius-default - 1px;
|
||||
}
|
||||
}
|
||||
|
||||
.line_holder:last-of-type {
|
||||
.diff-grid-left.left-side.parallel {
|
||||
.diff-td:last-child,
|
||||
td:last-child {
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ module Projects
|
|||
class BranchRulesController < Projects::ApplicationController
|
||||
before_action :authorize_admin_project!
|
||||
before_action do
|
||||
push_frontend_feature_flag(:add_branch_rule, @project)
|
||||
push_frontend_feature_flag(:approval_rules_drawer, @project)
|
||||
push_frontend_feature_flag(:edit_branch_rules, @project)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -163,11 +163,10 @@ class RegistrationsController < Devise::RegistrationsController
|
|||
{}
|
||||
end
|
||||
|
||||
# overridden in EE
|
||||
def track_successful_user_creation(user)
|
||||
label = user_invited? ? 'invited' : 'signup'
|
||||
Gitlab::Tracking.event(self.class.name, 'create_user', label: label, user: user)
|
||||
|
||||
Gitlab::Tracking.event(self.class.name, 'successfully_submitted_form', user: user)
|
||||
end
|
||||
|
||||
def ensure_destroy_prerequisites_met
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ module Types
|
|||
alpha: { milestone: '16.7' }
|
||||
|
||||
def inputs
|
||||
spec_inputs = object.spec.fetch('inputs', object.inputs)
|
||||
spec_inputs = object.spec.fetch('inputs', {})
|
||||
|
||||
spec_inputs.map do |key, value|
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ module Ci
|
|||
self.table_name = 'catalog_resource_components'
|
||||
|
||||
include IgnorableColumns
|
||||
ignore_column :inputs, remove_with: '17.1', remove_after: '2024-05-16'
|
||||
ignore_column :path, remove_with: '17.1', remove_after: '2024-05-20'
|
||||
|
||||
belongs_to :project, inverse_of: :ci_components
|
||||
|
|
@ -22,7 +23,6 @@ module Ci
|
|||
|
||||
enum resource_type: { template: 1 }
|
||||
|
||||
validates :inputs, json_schema: { filename: 'catalog_resource_component_inputs' }
|
||||
validates :spec, json_schema: { filename: 'catalog_resource_component_spec' }
|
||||
validates :version, :catalog_resource, :project, :name, presence: true
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ module Ci
|
|||
self.sequence_name = :ci_job_artifacts_id_seq
|
||||
|
||||
partitionable scope: :job, partitioned: true
|
||||
query_constraints :id, :partition_id
|
||||
|
||||
enum accessibility: { public: 0, private: 1, none: 2 }, _suffix: true
|
||||
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
"description": "Catalog Resource Component Inputs",
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
".*": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"patternProperties": {
|
||||
"default": {
|
||||
"type": [
|
||||
"array",
|
||||
"boolean",
|
||||
"integer",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
"regex": {
|
||||
"type": "string"
|
||||
},
|
||||
"^type$": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -29,5 +29,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
name: add_branch_rule
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/435948
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/437003
|
||||
milestone: '16.8'
|
||||
type: development
|
||||
group: group::source code
|
||||
default_enabled: false
|
||||
|
|
@ -81,6 +81,7 @@ Audit event types belong to the following product categories.
|
|||
| [`update_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74632) | Event triggered when an external audit event destination is updated| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [14.6](https://gitlab.com/gitlab-org/gitlab/-/issues/344664) | Group |
|
||||
| [`update_instance_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125846) | Event triggered when an instance level external audit event destination is updated| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.2](https://gitlab.com/gitlab-org/gitlab/-/issues/404730) | Instance |
|
||||
| [`updated_group_audit_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/148388) | Event triggered when an external audit event destination for a top-level group is updated.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.11](https://gitlab.com/gitlab-org/gitlab/-/issues/436610) | Group |
|
||||
| [`updated_instance_audit_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/149104) | Event triggered when an external audit event destination for a GitLab instance is updated.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.11](https://gitlab.com/gitlab-org/gitlab/-/issues/436615) | Instance |
|
||||
|
||||
### Build artifacts
|
||||
|
||||
|
|
|
|||
|
|
@ -152,8 +152,6 @@ artifacts, as described in the [troubleshooting documentation](../../administrat
|
|||
|
||||
## Keep the latest artifacts for all jobs in the latest successful pipelines
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50889) in GitLab 13.9.
|
||||
|
||||
When enabled (default), the artifacts of the most recent pipeline for each Git ref
|
||||
([branches and tags](https://git-scm.com/book/en/v2/Git-Internals-Git-References))
|
||||
are locked against deletion and kept regardless of the expiry time.
|
||||
|
|
@ -237,8 +235,6 @@ The default is `0` (no restriction).
|
|||
|
||||
## Default CI/CD configuration file
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18073) in GitLab 12.5.
|
||||
|
||||
The default CI/CD configuration file and path for new projects can be set in the Admin Area
|
||||
of your GitLab instance (`.gitlab-ci.yml` if not set):
|
||||
|
||||
|
|
@ -251,7 +247,6 @@ It is also possible to specify a [custom CI/CD configuration file for a specific
|
|||
|
||||
## Set CI/CD limits
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/352175) in GitLab 14.10.
|
||||
> - **Maximum number of active pipelines per project** setting [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/368195) in GitLab 16.0.
|
||||
|
||||
You can configure some [CI/CD limits](../../administration/instance_limits.md#cicd-limits)
|
||||
|
|
@ -405,7 +400,6 @@ To set the maximum file size:
|
|||
|
||||
## Restrict runner registration by all users in an instance
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/22225) in GitLab 14.1.
|
||||
> - [Enabled on GitLab.com and self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/368008) in GitLab 15.5.
|
||||
|
||||
GitLab administrators can adjust who is allowed to register runners, by showing and hiding areas of the UI.
|
||||
|
|
|
|||
|
|
@ -5061,6 +5061,33 @@ Input type: `InstanceAuditEventStreamingDestinationsDeleteInput`
|
|||
| <a id="mutationinstanceauditeventstreamingdestinationsdeleteclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationinstanceauditeventstreamingdestinationsdeleteerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
|
||||
### `Mutation.instanceAuditEventStreamingDestinationsUpdate`
|
||||
|
||||
DETAILS:
|
||||
**Introduced** in GitLab 16.11.
|
||||
**Status**: Experiment.
|
||||
|
||||
Input type: `InstanceAuditEventStreamingDestinationsUpdateInput`
|
||||
|
||||
#### Arguments
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationinstanceauditeventstreamingdestinationsupdatecategory"></a>`category` | [`String`](#string) | Destination category. |
|
||||
| <a id="mutationinstanceauditeventstreamingdestinationsupdateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationinstanceauditeventstreamingdestinationsupdateconfig"></a>`config` | [`JSON`](#json) | Destination config. |
|
||||
| <a id="mutationinstanceauditeventstreamingdestinationsupdateid"></a>`id` | [`AuditEventsInstanceExternalStreamingDestinationID!`](#auditeventsinstanceexternalstreamingdestinationid) | ID of external audit event destination to update. |
|
||||
| <a id="mutationinstanceauditeventstreamingdestinationsupdatename"></a>`name` | [`String`](#string) | Destination name. |
|
||||
| <a id="mutationinstanceauditeventstreamingdestinationsupdatesecrettoken"></a>`secretToken` | [`String`](#string) | Secret token. |
|
||||
|
||||
#### Fields
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationinstanceauditeventstreamingdestinationsupdateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationinstanceauditeventstreamingdestinationsupdateerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationinstanceauditeventstreamingdestinationsupdateexternalauditeventdestination"></a>`externalAuditEventDestination` | [`InstanceAuditEventStreamingDestination`](#instanceauditeventstreamingdestination) | Updated destination. |
|
||||
|
||||
### `Mutation.instanceExternalAuditEventDestinationCreate`
|
||||
|
||||
Input type: `InstanceExternalAuditEventDestinationCreateInput`
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ GET /projects/:id/pipelines/:pipeline_id/jobs
|
|||
|-------------------|--------------------------------|----------|-------------|
|
||||
| `id` | integer/string | Yes | ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
|
||||
| `pipeline_id` | integer | Yes | ID of a pipeline. Can also be obtained in CI jobs via the [predefined CI variable](../ci/variables/predefined_variables.md) `CI_PIPELINE_ID`. |
|
||||
| `include_retried` | boolean | No | Include retried jobs in the response. Defaults to `false`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/272627) in GitLab 13.9. |
|
||||
| `include_retried` | boolean | No | Include retried jobs in the response. Defaults to `false`. |
|
||||
| `scope` | string **or** array of strings | No | Scope of jobs to show. Either one of or an array of the following: `created`, `pending`, `running`, `failed`, `success`, `canceled`, `skipped`, `waiting_for_resource`, or `manual`. All jobs are returned if `scope` is not provided. |
|
||||
|
||||
```shell
|
||||
|
|
@ -875,7 +875,7 @@ POST /projects/:id/jobs/:job_id/play
|
|||
|----------------------------|-----------------|----------|-------------|
|
||||
| `id` | integer/string | Yes | ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
|
||||
| `job_id` | integer | Yes | ID of a job. |
|
||||
| `job_variables_attributes` | array of hashes | No | An array containing the custom variables available to the job. [Introduced in](https://gitlab.com/gitlab-org/gitlab/-/issues/37267) GitLab 14.9. |
|
||||
| `job_variables_attributes` | array of hashes | No | An array containing the custom variables available to the job. |
|
||||
|
||||
Example request:
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ GET /projects/:id/pipelines
|
|||
| `scope` | string | No | The scope of pipelines, one of: `running`, `pending`, `finished`, `branches`, `tags` |
|
||||
| `sha` | string | No | The SHA of pipelines |
|
||||
| `sort` | string | No | Sort pipelines in `asc` or `desc` order (default: `desc`) |
|
||||
| `source` | string | No | In [GitLab 14.3 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/325439), how the pipeline was triggered, one of: `api`, `chat`, `external`, `external_pull_request_event`, `merge_request_event`, `ondemand_dast_scan`, `ondemand_dast_validation`, `parent_pipeline`, `pipeline`, `push`, `schedule`, `security_orchestration_policy`, `trigger`, `web`, or `webide`. |
|
||||
| `source` | string | No | Returns how the pipeline was triggered, one of: `api`, `chat`, `external`, `external_pull_request_event`, `merge_request_event`, `ondemand_dast_scan`, `ondemand_dast_validation`, `parent_pipeline`, `pipeline`, `push`, `schedule`, `security_orchestration_policy`, `trigger`, `web`, or `webide`. |
|
||||
| `status` | string | No | The status of pipelines, one of: `created`, `waiting_for_resource`, `preparing`, `pending`, `running`, `success`, `failed`, `canceled`, `skipped`, `manual`, `scheduled` |
|
||||
| `updated_after` | datetime | No | Return pipelines updated after the specified date. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
||||
| `updated_before` | datetime | No | Return pipelines updated before the specified date. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). |
|
||||
|
|
@ -229,8 +229,6 @@ Sample response:
|
|||
|
||||
### Get a pipeline's test report summary
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65471) in GitLab 14.2.
|
||||
|
||||
NOTE:
|
||||
This API route is part of the [Unit test report](../ci/testing/unit_test_reports.md) feature.
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,6 @@ DETAILS:
|
|||
**Tier:** Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18710) in GitLab 12.5.
|
||||
> - [Moved](https://about.gitlab.com/blog/2021/01/26/new-gitlab-product-subscription-model/) to GitLab Premium in 13.9.
|
||||
|
||||
WARNING:
|
||||
This feature was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/387751) in GitLab 15.8
|
||||
and is planned for removal in 17.0. This change is a breaking change.
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ DETAILS:
|
|||
**Tier:** Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
|
||||
>[Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/4642) in GitLab 10.6.
|
||||
|
||||
GitLab CI/CD can be used with [GitHub](github_integration.md), [Bitbucket Cloud](bitbucket_integration.md),
|
||||
or any other Git server, though there are some [limitations](#limitations).
|
||||
|
||||
|
|
@ -38,8 +36,6 @@ the [import sources configuration](../../administration/settings/import_and_expo
|
|||
|
||||
## Pipelines for external pull requests
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/65139) in GitLab 12.3.
|
||||
|
||||
When using GitLab CI/CD with an [external repository on GitHub](github_integration.md),
|
||||
it's possible to run a pipeline in the context of a Pull Request.
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,7 @@ If you get duplicate pipelines in merge requests, your pipeline might be configu
|
|||
to run for both branches and merge requests at the same time. Adjust your pipeline
|
||||
configuration to [avoid duplicate pipelines](../jobs/job_control.md#avoid-duplicate-pipelines).
|
||||
|
||||
In [GitLab 13.7 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/201845),
|
||||
you can add `workflow:rules` to [switch from branch pipelines to merge request pipelines](../yaml/workflow.md#switch-between-branch-pipelines-and-merge-request-pipelines).
|
||||
You can add `workflow:rules` to [switch from branch pipelines to merge request pipelines](../yaml/workflow.md#switch-between-branch-pipelines-and-merge-request-pipelines).
|
||||
After a merge request is open on the branch, the pipeline switches to a merge request pipeline.
|
||||
|
||||
## Two pipelines when pushing an invalid CI/CD configuration file
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ Branch pipelines:
|
|||
|
||||
## Merge request pipeline
|
||||
|
||||
> - The `detached` label was [changed](https://gitlab.com/gitlab-org/gitlab/-/issues/352939) to `merge request` in GitLab 14.9.
|
||||
|
||||
Instead of a branch pipeline, you can configure your pipeline to run every time you make changes to the
|
||||
source branch in a merge request.
|
||||
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@ Otherwise, the pipeline is not created. No error message is displayed.
|
|||
|
||||
## Add a pipeline schedule
|
||||
|
||||
> - Scheduled pipelines for tags [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/23292) in GitLab 14.9.
|
||||
|
||||
To add a pipeline schedule:
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find your project.
|
||||
|
|
@ -46,8 +44,6 @@ you must delete unused schedules before you can add another.
|
|||
|
||||
## Edit a pipeline schedule
|
||||
|
||||
> - Introduced in GitLab 14.8, only a pipeline schedule owner can edit the schedule.
|
||||
|
||||
The owner of a pipeline schedule can edit it:
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find your project.
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ running job can be cancelled before it completes. After a job with
|
|||
|
||||
## Prevent outdated deployment jobs
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/25276) in GitLab 12.9.
|
||||
> - In GitLab 15.5, the behavior was [changed](https://gitlab.com/gitlab-org/gitlab/-/issues/363328) to prevent outdated job runs.
|
||||
|
||||
Your project may have multiple concurrent deployment jobs that are
|
||||
|
|
@ -131,8 +130,6 @@ To change the permissions to cancel pipelines or jobs:
|
|||
|
||||
## Specify a custom CI/CD configuration file
|
||||
|
||||
> - Support for external `.gitlab-ci.yml` locations [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/14376) in GitLab 12.6.
|
||||
|
||||
GitLab expects to find the CI/CD configuration file (`.gitlab-ci.yml`) in the project's root
|
||||
directory. However, you can specify an alternate filename path, including locations outside the project.
|
||||
|
||||
|
|
@ -202,9 +199,6 @@ in the `.gitlab-ci.yml` file.
|
|||
|
||||
## Limit the number of changes fetched during clone
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/28919) in GitLab 12.0.
|
||||
> - [Changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/77576) `git depth` value in GitLab 14.7.
|
||||
|
||||
You can limit the number of changes that GitLab CI/CD fetches when it clones
|
||||
a repository.
|
||||
|
||||
|
|
|
|||
|
|
@ -67,8 +67,6 @@ The process of configuring review apps is as follows:
|
|||
|
||||
### Enable review apps button
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/118844) in GitLab 12.8.
|
||||
|
||||
When configuring review apps for a project, you add a new job to the `.gitlab-ci.yml` file,
|
||||
as mentioned above. To facilitate this, and if you are using Kubernetes, you can select
|
||||
**Enable review apps** and GitLab prompts you with a template code block that
|
||||
|
|
@ -201,8 +199,6 @@ DETAILS:
|
|||
**Tier:** Premium, Ultimate
|
||||
**Offering:** Self-managed
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/10761) in GitLab 12.0.
|
||||
> - [Moved](https://about.gitlab.com/blog/2021/01/26/new-gitlab-product-subscription-model/) to GitLab Premium in 13.9.
|
||||
> - It's [deployed behind a feature flag](../../user/feature_flags.md), `anonymous_visual_review_feedback`, disabled by default.
|
||||
> - It's disabled on GitLab.com.
|
||||
|
||||
|
|
@ -307,8 +303,6 @@ merge request ID before you can provide feedback.
|
|||
|
||||
### Authentication for Visual Reviews
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/42750#note_317271120) in GitLab 12.10.
|
||||
|
||||
To enable visual reviews for private and internal projects, set the
|
||||
[`data-require-auth` variable](#configure-review-apps-for-visual-reviews) to `true`. When enabled,
|
||||
the user must enter a [personal access token](../../user/profile/personal_access_tokens.md)
|
||||
|
|
|
|||
|
|
@ -73,9 +73,6 @@ coverage in the tool's output:
|
|||
|
||||
### View history of project code coverage
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/209121) the ability to download a `.csv` in GitLab 12.10.
|
||||
> - Graph [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/33743) in GitLab 13.1.
|
||||
|
||||
To see the evolution of your project code coverage over time,
|
||||
you can view a graph or download a CSV file with this data.
|
||||
|
||||
|
|
@ -109,9 +106,6 @@ DETAILS:
|
|||
**Tier:** Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/15765) in GitLab 14.0.
|
||||
> - [Made configurable in Project Settings](https://gitlab.com/gitlab-org/gitlab/-/issues/331001) in GitLab 14.1.
|
||||
|
||||
When merging a request that would cause the project's test coverage to decline, you can stipulate that such merge requests require approval by selected users or a group.
|
||||
|
||||
Follow these steps to enable the `Coverage-Check` MR approval rule:
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ DETAILS:
|
|||
**Tier:** Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/198550) in GitLab 13.1.
|
||||
|
||||
For applications that use RSpec for running tests, we've introduced the `Verify/Failfast`
|
||||
[template to run subsets of your test suite](https://gitlab.com/gitlab-org/gitlab/-/tree/master/lib/gitlab/ci/templates/Verify/FailFast.gitlab-ci.yml),
|
||||
based on the changes in your merge request.
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ DETAILS:
|
|||
**Tier:** Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/10683) in GitLab 13.2.
|
||||
|
||||
With Load Performance Testing, you can test the impact of any pending code changes
|
||||
to your application's backend in [GitLab CI/CD](../index.md).
|
||||
|
||||
|
|
|
|||
|
|
@ -10,9 +10,6 @@ DETAILS:
|
|||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/3708) in GitLab 12.9.
|
||||
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/249811) in GitLab 13.5.
|
||||
|
||||
With the help of [GitLab CI/CD](../index.md), you can collect the test
|
||||
coverage information of your favorite testing or coverage-analysis tool, and visualize
|
||||
this information inside the file diff view of your merge requests (MRs). This allows you
|
||||
|
|
@ -99,9 +96,6 @@ child_test_pipeline:
|
|||
|
||||
### Automatic class path correction
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/217664) in GitLab 13.8.
|
||||
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/284822) in GitLab 13.9.
|
||||
|
||||
The coverage report properly matches changed files only if the `filename` of a `class` element
|
||||
contains the full path relative to the project root. However, in some coverage analysis frameworks,
|
||||
the generated Cobertura XML has the `filename` path relative to the class package directory instead.
|
||||
|
|
|
|||
|
|
@ -88,10 +88,6 @@ To copy the name of a single failed test:
|
|||
|
||||
### Number of recent failures
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/241759) in merge requests in GitLab 13.7.
|
||||
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/268249) in GitLab 13.8.
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/235525) in Test Reports in GitLab 13.9.
|
||||
|
||||
If a test failed in the project's default branch in the last 14 days, a message like
|
||||
`Failed {n} time(s) in {default_branch} in the last 14 days` is displayed for that test.
|
||||
|
||||
|
|
@ -140,9 +136,6 @@ and all report information is displayed.
|
|||
|
||||
## View Unit test reports on GitLab
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24792) in GitLab 12.5 behind a feature flag (`junit_pipeline_view`), disabled by default.
|
||||
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/216478) in GitLab 13.3.
|
||||
|
||||
If JUnit report format XML files are generated and uploaded as part of a pipeline, these reports
|
||||
can be viewed inside the pipelines details page. The **Tests** tab on this page
|
||||
displays a list of test suites and cases reported from the XML file.
|
||||
|
|
@ -156,8 +149,6 @@ You can also retrieve the reports via the [GitLab API](../../api/pipelines.md#ge
|
|||
|
||||
### Unit test reports parsing errors
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/263457) in GitLab 13.10.
|
||||
|
||||
If parsing JUnit report XML results in an error, an indicator is shown next to the job name. Hovering over the icon shows the parser error in a tooltip. If multiple parsing errors come from [grouped jobs](../jobs/index.md#group-jobs-in-a-pipeline), GitLab shows only the first error from the group.
|
||||
|
||||

|
||||
|
|
@ -168,9 +159,6 @@ GitLab does not parse very [large nodes](https://nokogiri.org/tutorials/parsing_
|
|||
|
||||
## View JUnit screenshots on GitLab
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/202114) in GitLab 13.0 behind the `:junit_pipeline_screenshots_view` feature flag, disabled by default.
|
||||
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/216979) in GitLab 13.12.
|
||||
|
||||
You can upload your screenshots as [artifacts](../yaml/artifacts_reports.md#artifactsreportsjunit) to GitLab.
|
||||
If JUnit report format XML files contain an `attachment` tag, GitLab parses the attachment.
|
||||
When uploading screenshot artifacts:
|
||||
|
|
|
|||
|
|
@ -112,8 +112,6 @@ GitLab can display the results of one or more reports in:
|
|||
DETAILS:
|
||||
**Tier:** Premium, Ultimate
|
||||
|
||||
> [Name changed](https://gitlab.com/gitlab-org/gitlab/-/issues/225914) from `artifacts:reports:performance` in GitLab 14.0.
|
||||
|
||||
The `browser_performance` report collects [Browser Performance Testing metrics](../testing/browser_performance_testing.md)
|
||||
as artifacts.
|
||||
|
||||
|
|
@ -124,8 +122,6 @@ GitLab cannot display the combined results of multiple `browser_performance` rep
|
|||
|
||||
## `artifacts:reports:coverage_report`
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/344533) in GitLab 14.10.
|
||||
|
||||
Use `coverage_report` to collect coverage report in Cobertura format.
|
||||
|
||||
The `cobertura` report collects [Cobertura coverage XML files](../testing/test_coverage_visualization.md).
|
||||
|
|
@ -257,10 +253,7 @@ The `dotenv` report collects a set of environment variables as artifacts.
|
|||
The collected variables are registered as runtime-created variables of the job,
|
||||
which you can use to [set dynamic environment URLs after a job finishes](../environments/index.md#set-a-dynamic-environment-url).
|
||||
|
||||
If duplicate environment variables are present in a `dotenv` report:
|
||||
|
||||
- In GitLab 14.6 and later, the last one specified is used.
|
||||
- In GitLab 14.5 and earlier, an error occurs.
|
||||
If duplicate environment variables are present in a `dotenv` report, the last one specified is used.
|
||||
|
||||
You should avoid storing sensitive data like credentials in dotenv reports, as the
|
||||
reports can be downloaded from the pipeline details page. If necessary, you can use
|
||||
|
|
|
|||
|
|
@ -41,6 +41,28 @@ If you upgrade to the Ultimate tier, you get access to historical data, and can
|
|||
|
||||
The Value Streams Dashboard panels has a default configuration, but you can also [customize the dashboard panels](#customize-the-dashboard-panels).
|
||||
|
||||
### Overview panel
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/439699) in GitLab 16.7 [with a flag](../../administration/feature_flags.md) named `group_analytics_dashboard_dynamic_vsd`. Disabled by default.
|
||||
|
||||
FLAG:
|
||||
On self-managed GitLab, by default this feature is not available. To make it available per group or for your entire instance, an administrator can [enable the feature flag](../../administration/feature_flags.md) named `group_analytics_dashboard_dynamic_vsd`. On GitLab.com, this feature is available.
|
||||
|
||||
The Overview panel provides a holistic view of the top-level namespace activity by visualizing key DevOps metrics.
|
||||
The panel displays metrics for:
|
||||
|
||||
- Subgroups
|
||||
- Projects
|
||||
- Users
|
||||
- Issues
|
||||
- Merge requests
|
||||
- Pipelines
|
||||
|
||||
Data displayed in the Overview panel is collected by batch processing. GitLab stores record counts for each subgroup in the database, then aggregates the record counts to provide metrics for the top-level group.
|
||||
Data is aggregated monthly, around the end of the month, on a best-effort basis depending on the load on GitLab systems.
|
||||
|
||||
For more information, see [epic 10417](https://gitlab.com/groups/gitlab-org/-/epics/10417#iterations-path).
|
||||
|
||||
### DevSecOps metrics comparison panel
|
||||
|
||||
> - Contributor count metric [added](https://gitlab.com/gitlab-org/gitlab/-/issues/433353) in GitLab 16.9.
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ DETAILS:
|
|||
**Tier:** Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/215104) in GitLab 13.4.
|
||||
|
||||
Repositories analytics for groups provides information about test coverage for all projects in a group. An
|
||||
[issue exists](https://gitlab.com/gitlab-org/gitlab/-/issues/273527) to also extend support for all projects in
|
||||
subgroups.
|
||||
|
|
@ -20,8 +18,6 @@ It is similar to [repository analytics for projects](../../analytics/repository_
|
|||
|
||||
## Current group code coverage
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/263478) in GitLab 13.7.
|
||||
|
||||
The **Analyze > Repository analytics** group page displays the overall test coverage of all your projects in your group.
|
||||
In the **Overall activity** section, you can see:
|
||||
|
||||
|
|
@ -31,14 +27,10 @@ In the **Overall activity** section, you can see:
|
|||
|
||||
## Average group test coverage from the last 30 days
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/215140) in GitLab 13.9.
|
||||
|
||||
The **Analyze > Repository analytics** group page displays the average test coverage of all your projects in your group in a graph for the last 30 days.
|
||||
|
||||
## Latest project test coverage list
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/267624) in GitLab 13.6.
|
||||
|
||||
To see the latest code coverage for each project in your group:
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find your group.
|
||||
|
|
@ -50,8 +42,6 @@ You can download code coverage data for specific projects using
|
|||
|
||||
## Download historic test coverage data
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/215104) in GitLab 13.4.
|
||||
|
||||
You can get a CSV of the code coverage data for all of the projects in your group. This report has a maximum of 1000 records. The code coverage data is from the default branch in each project.
|
||||
|
||||
To get the report:
|
||||
|
|
@ -74,9 +64,7 @@ For each day that a coverage report was generated by a job in a project's pipeli
|
|||
If the project's code coverage was calculated more than once in a day, the last value from that day is used.
|
||||
|
||||
NOTE:
|
||||
[In GitLab 13.7 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/270102), group code coverage
|
||||
data is taken from the configured [default branch](../../project/repository/branches/default.md).
|
||||
In earlier versions, it is taken from the `master` branch.
|
||||
Group code coverage data is taken from the configured [default branch](../../project/repository/branches/default.md).
|
||||
|
||||
<!-- ## Troubleshooting
|
||||
|
||||
|
|
|
|||
|
|
@ -102,6 +102,31 @@ Prerequisites:
|
|||
|
||||
In GitLab 15.7 and later, you can [use the application settings API to disable personal access tokens](../../api/settings.md#list-of-settings-that-can-be-accessed-via-api-calls).
|
||||
|
||||
### Disable personal access tokens for enterprise users
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/369504) in GitLab 16.11 [with a flag](../../administration/feature_flags.md) named `enterprise_disable_personal_access_tokens`. Disabled by default.
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- You must have the Owner role in the group that the enterprise user belongs to.
|
||||
|
||||
Disabling the personal access tokens of a group's [enterprise users](../enterprise_user/index.md):
|
||||
|
||||
- Stops the enterprise users from creating new personal access tokens. This behavior applies
|
||||
even if an enterprise user is also an administrator of the group.
|
||||
- Disables the existing personal access tokens of the enterprise users.
|
||||
|
||||
NOTE:
|
||||
Disabling personal access tokens for enterprise users does not disable personal access tokens for [service accounts](service_accounts.md).
|
||||
|
||||
To disable the enterprise users' personal access tokens:
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find your group or subgroup.
|
||||
1. Select **Settings > General**.
|
||||
1. Expand **Permissions and group features**.
|
||||
1. Under **Personal access tokens**, select **Disable personal access tokens**.
|
||||
1. Select **Save changes**.
|
||||
|
||||
## View the last time a token was used
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/33162) in GitLab 13.2. Token usage information is updated every 24 hours.
|
||||
|
|
|
|||
|
|
@ -171,6 +171,75 @@ To view the **Branch rules overview** list:
|
|||
- [Approval rules](../../merge_requests/approvals/rules.md).
|
||||
- [Status checks](../../merge_requests/status_checks.md).
|
||||
|
||||
#### Create a branch rule
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/88279) in GitLab 16.8 with a flag named `add_branch_rules`. Disabled by default.
|
||||
> - Feature flag `add_branch_rules` [renamed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/88279) to `edit_branch_rules` in GitLab 16.11. Disabled by default.
|
||||
|
||||
FLAG:
|
||||
On self-managed GitLab, by default this feature is not available. To make it available per project or for your entire instance, an administrator can [enable the feature flag](../../../../administration/feature_flags.md) named `edit_branch_rules`.
|
||||
On GitLab.com and GitLab Dedicated, this feature is not available.
|
||||
This feature is not ready for production use.
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- You must have at least the Maintainer role for the project.
|
||||
|
||||
To create a branch rule:
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find your project.
|
||||
1. Select **Settings > Repository**.
|
||||
1. Expand **Branch rules**.
|
||||
1. In the **Add branch rule** dropdown list, select **Branch name or pattern**.
|
||||
1. In the dialog, from the **Create branch rule** dropdown list, select a branch name or create a wildcard by typing `*`.
|
||||
|
||||
#### Edit a branch rule
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/88279) in GitLab 16.8 with a flag named `add_branch_rules`. Disabled by default.
|
||||
> - Feature flag `add_branch_rules` [renamed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/88279) to `edit_branch_rules` in GitLab 16.11. Disabled by default.
|
||||
|
||||
FLAG:
|
||||
On self-managed GitLab, by default this feature is not available. To make it available per project or for your entire instance, an administrator can [enable the feature flag](../../../../administration/feature_flags.md) named `edit_branch_rules`.
|
||||
On GitLab.com and GitLab Dedicated, this feature is not available.
|
||||
This feature is not ready for production use.
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- You must have at least the Maintainer role for the project.
|
||||
|
||||
To edit a branch rule:
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find your project.
|
||||
1. Select **Settings > Repository**.
|
||||
1. Expand **Branch rules**.
|
||||
1. Next to a rule you want to edit, select **View details**.
|
||||
1. In the upper-right corner, select **Edit**.
|
||||
1. In the dialog, from the **Create branch rule** dropdown list, select a branch name or create a wildcard by typing `*`.
|
||||
1. Select **Update**.
|
||||
|
||||
#### Delete a branch rule
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/88279) in GitLab 16.8 with a flag named `add_branch_rules`. Disabled by default.
|
||||
> - Feature flag `add_branch_rules` [renamed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/88279) to `edit_branch_rules` in GitLab 16.11. Disabled by default.
|
||||
|
||||
FLAG:
|
||||
On self-managed GitLab, by default this feature is not available. To make it available per project or for your entire instance, an administrator can [enable the feature flag](../../../../administration/feature_flags.md) named `edit_branch_rules`.
|
||||
On GitLab.com and GitLab Dedicated, this feature is not available.
|
||||
This feature is not ready for production use.
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- You must have at least the Maintainer role for the project.
|
||||
|
||||
To delete a branch rule:
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find your project.
|
||||
1. Select **Settings > Repository**.
|
||||
1. Expand **Branch rules**.
|
||||
1. Next to a rule you want to delete, select **View details**.
|
||||
1. In the upper-right corner, select **Delete rule**.
|
||||
1. On the confirmation dialog, select **Delete branch rule**.
|
||||
|
||||
## Name your branch
|
||||
|
||||
Git enforces [branch name rules](https://git-scm.com/docs/git-check-ref-format)
|
||||
|
|
|
|||
|
|
@ -9037,6 +9037,9 @@ msgstr ""
|
|||
msgid "BranchRules|Roles"
|
||||
msgstr ""
|
||||
|
||||
msgid "BranchRules|Rule target"
|
||||
msgstr ""
|
||||
|
||||
msgid "BranchRules|Select Branch or create wildcard"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -45991,6 +45994,9 @@ msgstr ""
|
|||
msgid "SecurityOrchestration|Compliance framework has no projects"
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityOrchestration|Configure your conditions in the pipeline execution file. %{linkStart}What can pipeline execution do?%{linkEnd}"
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityOrchestration|Create more robust vulnerability rules and apply them to all your projects."
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ gem 'chemlab', '~> 0.11', '>= 0.11.1'
|
|||
gem 'chemlab-library-www-gitlab-com', '~> 0.1', '>= 0.1.1'
|
||||
|
||||
# dependencies for jenkins client
|
||||
gem 'nokogiri', '~> 1.16', '>= 1.16.3'
|
||||
gem 'nokogiri', '~> 1.16', '>= 1.16.4'
|
||||
|
||||
gem 'deprecation_toolkit', '~> 2.2.0', require: false
|
||||
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ GEM
|
|||
multi_json (1.15.0)
|
||||
multi_xml (0.6.0)
|
||||
netrc (0.11.0)
|
||||
nokogiri (1.16.3)
|
||||
nokogiri (1.16.4)
|
||||
mini_portile2 (~> 2.8.2)
|
||||
racc (~> 1.4)
|
||||
octokit (8.1.0)
|
||||
|
|
@ -365,7 +365,7 @@ DEPENDENCIES
|
|||
gitlab_quality-test_tooling (~> 1.22.0)
|
||||
influxdb-client (~> 3.1)
|
||||
knapsack (~> 4.0)
|
||||
nokogiri (~> 1.16, >= 1.16.3)
|
||||
nokogiri (~> 1.16, >= 1.16.4)
|
||||
octokit (~> 8.1.0)
|
||||
parallel (~> 1.24)
|
||||
parallel_tests (~> 4.4)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ module QA
|
|||
element 'details-button'
|
||||
end
|
||||
|
||||
def click_edit_branch_rules
|
||||
def click_add_branch_rule
|
||||
click_element('add-branch-rule-button')
|
||||
click_button('Create protected branch')
|
||||
end
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ module QA
|
|||
|
||||
Page::Project::Settings::Repository.perform(&:expand_branch_rules)
|
||||
|
||||
Page::Project::Settings::BranchRules.perform(&:click_edit_branch_rules)
|
||||
Page::Project::Settings::BranchRules.perform(&:click_add_branch_rule)
|
||||
|
||||
Page::Project::Settings::ProtectedBranches.perform do |settings|
|
||||
settings.select_branch(branch_name)
|
||||
|
|
|
|||
|
|
@ -212,13 +212,6 @@ RSpec.describe RegistrationsController, feature_category: :user_profile do
|
|||
property: member.id.to_s,
|
||||
user: member.reload.user
|
||||
)
|
||||
|
||||
expect_snowplow_event(
|
||||
category: 'RegistrationsController',
|
||||
action: 'create_user',
|
||||
label: 'invited',
|
||||
user: member.reload.user
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -233,13 +226,6 @@ RSpec.describe RegistrationsController, feature_category: :user_profile do
|
|||
action: 'accepted',
|
||||
label: 'invite_email'
|
||||
)
|
||||
|
||||
expect_snowplow_event(
|
||||
category: 'RegistrationsController',
|
||||
action: 'create_user',
|
||||
label: 'signup',
|
||||
user: member.reload.user
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -554,15 +540,6 @@ RSpec.describe RegistrationsController, feature_category: :user_profile do
|
|||
method: 'create'
|
||||
)
|
||||
end
|
||||
|
||||
it 'does not track failed form submission' do
|
||||
post_create
|
||||
|
||||
expect_no_snowplow_event(
|
||||
category: described_class.name,
|
||||
action: 'successfully_submitted_form'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the password is not weak' do
|
||||
|
|
@ -574,16 +551,6 @@ RSpec.describe RegistrationsController, feature_category: :user_profile do
|
|||
action: 'track_weak_password_error'
|
||||
)
|
||||
end
|
||||
|
||||
it 'tracks successful form submission' do
|
||||
post_create
|
||||
|
||||
expect_snowplow_event(
|
||||
category: described_class.name,
|
||||
action: 'successfully_submitted_form',
|
||||
user: User.find_by(email: base_user_params[:email])
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with preferred language' do
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ describe('View branch rules', () => {
|
|||
});
|
||||
|
||||
describe('When add branch rules is FF disabled', () => {
|
||||
beforeEach(() => createComponent({ editBranchRule: false }));
|
||||
beforeEach(() => createComponent({ editBranchRules: false }));
|
||||
it('does not render delete rule button and modal when ff is disabled', () => {
|
||||
expect(findDeleteRuleButton().exists()).toBe(false);
|
||||
expect(findDeleteRuleModal().exists()).toBe(false);
|
||||
|
|
|
|||
|
|
@ -157,9 +157,9 @@ describe('Branch rules app', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('Add branch rule when editBranchRule FF disabled', () => {
|
||||
describe('Add branch rule when editBranchRules FF disabled', () => {
|
||||
beforeEach(() => {
|
||||
createComponent({ glFeatures: { editBranchRule: false } });
|
||||
createComponent({ glFeatures: { editBranchRules: false } });
|
||||
});
|
||||
it('renders an Add branch rule button', () => {
|
||||
expect(findAddBranchRuleButton().exists()).toBe(true);
|
||||
|
|
|
|||
|
|
@ -33,18 +33,8 @@ RSpec.describe Ci::Catalog::Resources::Component, type: :model, feature_category
|
|||
it { is_expected.to validate_presence_of(:version) }
|
||||
it { is_expected.to validate_presence_of(:name) }
|
||||
|
||||
context 'when `inputs` and `spec` are valid' do
|
||||
context 'when `spec` is valid' do
|
||||
it 'returns no errors' do
|
||||
component.inputs = {
|
||||
website: nil,
|
||||
environment: {
|
||||
default: 'test'
|
||||
},
|
||||
tags: {
|
||||
type: 'array',
|
||||
default: ['tag1']
|
||||
}
|
||||
}
|
||||
component.spec = {
|
||||
inputs: {
|
||||
website: nil,
|
||||
|
|
@ -62,15 +52,14 @@ RSpec.describe Ci::Catalog::Resources::Component, type: :model, feature_category
|
|||
end
|
||||
end
|
||||
|
||||
context 'when `inputs` and `spec` are invalid' do
|
||||
context 'when `spec` is invalid' do
|
||||
it 'returns errors' do
|
||||
component.inputs = { boo: [] }
|
||||
component.spec = { not_inputs: { boo: '' } }
|
||||
|
||||
aggregate_failures do
|
||||
expect(component).to be_invalid
|
||||
expect(component.errors.full_messages).to contain_exactly(
|
||||
'Inputs must be a valid json schema'
|
||||
'Spec must be a valid json schema'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -84,6 +84,12 @@ RSpec.describe 'Query.ciCatalogResource', feature_category: :pipeline_compositio
|
|||
}
|
||||
end
|
||||
|
||||
let_it_be(:components) do
|
||||
create_list(
|
||||
:ci_catalog_resource_component, 2, version: version, spec: { inputs: inputs }
|
||||
)
|
||||
end
|
||||
|
||||
let(:query) do
|
||||
<<~GQL
|
||||
query {
|
||||
|
|
@ -111,85 +117,40 @@ RSpec.describe 'Query.ciCatalogResource', feature_category: :pipeline_compositio
|
|||
GQL
|
||||
end
|
||||
|
||||
context "when a component's `spec` field has data" do
|
||||
let_it_be(:components) do
|
||||
create_list(
|
||||
:ci_catalog_resource_component, 2, version: version, spec: { inputs: inputs }
|
||||
it 'returns the components' do
|
||||
post_query
|
||||
|
||||
expect(graphql_data_at(:ciCatalogResource)).to match(a_graphql_entity_for(resource))
|
||||
|
||||
expect(graphql_data_at(:ciCatalogResource, :versions, :nodes, :components, :nodes)).to contain_exactly(
|
||||
a_graphql_entity_for(
|
||||
components.first,
|
||||
name: components.first.name,
|
||||
include_path: components.first.include_path,
|
||||
inputs: [
|
||||
a_graphql_entity_for(
|
||||
name: 'tags',
|
||||
default: nil,
|
||||
required: true
|
||||
),
|
||||
a_graphql_entity_for(
|
||||
name: 'website',
|
||||
default: nil,
|
||||
required: true
|
||||
),
|
||||
a_graphql_entity_for(
|
||||
name: 'environment',
|
||||
default: 'test',
|
||||
required: false
|
||||
)
|
||||
]
|
||||
),
|
||||
a_graphql_entity_for(
|
||||
components.last,
|
||||
name: components.last.name,
|
||||
include_path: components.last.include_path
|
||||
)
|
||||
end
|
||||
|
||||
it 'returns the components, fetching the inputs from `spec`' do
|
||||
post_query
|
||||
|
||||
expect(graphql_data_at(:ciCatalogResource)).to match(a_graphql_entity_for(resource))
|
||||
|
||||
expect(graphql_data_at(:ciCatalogResource, :versions, :nodes, :components, :nodes)).to contain_exactly(
|
||||
a_graphql_entity_for(
|
||||
components.first,
|
||||
name: components.first.name,
|
||||
include_path: components.first.include_path,
|
||||
inputs: [
|
||||
a_graphql_entity_for(
|
||||
name: 'tags',
|
||||
default: nil,
|
||||
required: true
|
||||
),
|
||||
a_graphql_entity_for(
|
||||
name: 'website',
|
||||
default: nil,
|
||||
required: true
|
||||
),
|
||||
a_graphql_entity_for(
|
||||
name: 'environment',
|
||||
default: 'test',
|
||||
required: false
|
||||
)
|
||||
]
|
||||
),
|
||||
a_graphql_entity_for(
|
||||
components.last,
|
||||
name: components.last.name,
|
||||
include_path: components.last.include_path
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context "when a component's `spec` field is empty" do
|
||||
let_it_be(:components) do
|
||||
[
|
||||
create(:ci_catalog_resource_component, version: version, inputs: inputs)
|
||||
]
|
||||
end
|
||||
|
||||
it 'instead fetches inputs from the `inputs` field' do
|
||||
post_query
|
||||
|
||||
expect(graphql_data_at(:ciCatalogResource, :versions, :nodes, :components, :nodes)).to contain_exactly(
|
||||
a_graphql_entity_for(
|
||||
components.first,
|
||||
name: components.first.name,
|
||||
include_path: components.first.include_path,
|
||||
inputs: [
|
||||
a_graphql_entity_for(
|
||||
name: 'tags',
|
||||
default: nil,
|
||||
required: true
|
||||
),
|
||||
a_graphql_entity_for(
|
||||
name: 'website',
|
||||
default: nil,
|
||||
required: true
|
||||
),
|
||||
a_graphql_entity_for(
|
||||
name: 'environment',
|
||||
default: 'test',
|
||||
required: false
|
||||
)
|
||||
]
|
||||
)
|
||||
)
|
||||
end
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue