Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
c4f71c5128
commit
e69d400913
|
|
@ -503,10 +503,6 @@ rspec:coverage:
|
|||
optional: true
|
||||
- job: rspec:artifact-collector ee remainder
|
||||
optional: true
|
||||
# Memory jobs
|
||||
- job: memory-on-boot
|
||||
optional: true
|
||||
artifacts: false
|
||||
script:
|
||||
- run_timed_command "bundle exec scripts/merge-simplecov"
|
||||
coverage: '/LOC \((\d+\.\d+%)\) covered.$/'
|
||||
|
|
|
|||
|
|
@ -99,7 +99,6 @@ Layout/EmptyLineAfterMagicComment:
|
|||
- 'app/services/packages/create_package_file_service.rb'
|
||||
- 'app/services/packages/maven/create_package_service.rb'
|
||||
- 'app/services/packages/maven/find_or_create_package_service.rb'
|
||||
- 'app/services/packages/npm/create_package_service.rb'
|
||||
- 'app/services/packages/npm/create_tag_service.rb'
|
||||
- 'app/services/packages/nuget/create_dependency_service.rb'
|
||||
- 'app/services/packages/remove_tag_service.rb'
|
||||
|
|
@ -669,7 +668,6 @@ Layout/EmptyLineAfterMagicComment:
|
|||
- 'spec/services/packages/helm/process_file_service_spec.rb'
|
||||
- 'spec/services/packages/maven/create_package_service_spec.rb'
|
||||
- 'spec/services/packages/maven/find_or_create_package_service_spec.rb'
|
||||
- 'spec/services/packages/npm/create_package_service_spec.rb'
|
||||
- 'spec/services/packages/npm/create_tag_service_spec.rb'
|
||||
- 'spec/services/packages/nuget/create_dependency_service_spec.rb'
|
||||
- 'spec/services/packages/pypi/create_package_service_spec.rb'
|
||||
|
|
|
|||
|
|
@ -547,7 +547,6 @@ Layout/LineLength:
|
|||
- 'app/services/packages/maven/find_or_create_package_service.rb'
|
||||
- 'app/services/packages/maven/metadata/append_package_file_service.rb'
|
||||
- 'app/services/packages/maven/metadata/sync_service.rb'
|
||||
- 'app/services/packages/npm/create_package_service.rb'
|
||||
- 'app/services/packages/nuget/search_service.rb'
|
||||
- 'app/services/packages/nuget/update_package_from_metadata_service.rb'
|
||||
- 'app/services/personal_access_tokens/create_service.rb'
|
||||
|
|
@ -4426,9 +4425,7 @@ Layout/LineLength:
|
|||
- 'spec/services/packages/generic/create_package_file_service_spec.rb'
|
||||
- 'spec/services/packages/helm/extract_file_metadata_service_spec.rb'
|
||||
- 'spec/services/packages/helm/process_file_service_spec.rb'
|
||||
- 'spec/services/packages/maven/find_or_create_package_service_spec.rb'
|
||||
- 'spec/services/packages/maven/metadata/sync_service_spec.rb'
|
||||
- 'spec/services/packages/npm/create_package_service_spec.rb'
|
||||
- 'spec/services/packages/npm/create_tag_service_spec.rb'
|
||||
- 'spec/services/packages/nuget/create_dependency_service_spec.rb'
|
||||
- 'spec/services/packages/nuget/search_service_spec.rb'
|
||||
|
|
|
|||
|
|
@ -2640,7 +2640,6 @@ RSpec/ContextWording:
|
|||
- 'spec/services/packages/maven/find_or_create_package_service_spec.rb'
|
||||
- 'spec/services/packages/maven/metadata/create_versions_xml_service_spec.rb'
|
||||
- 'spec/services/packages/maven/metadata/sync_service_spec.rb'
|
||||
- 'spec/services/packages/npm/create_package_service_spec.rb'
|
||||
- 'spec/services/packages/nuget/search_service_spec.rb'
|
||||
- 'spec/services/packages/nuget/update_package_from_metadata_service_spec.rb'
|
||||
- 'spec/services/packages/rubygems/dependency_resolver_service_spec.rb'
|
||||
|
|
|
|||
|
|
@ -3346,7 +3346,6 @@ RSpec/NamedSubject:
|
|||
- 'spec/services/packages/maven/metadata/create_versions_xml_service_spec.rb'
|
||||
- 'spec/services/packages/ml_model/find_or_create_package_service_spec.rb'
|
||||
- 'spec/services/packages/npm/create_metadata_cache_service_spec.rb'
|
||||
- 'spec/services/packages/npm/create_package_service_spec.rb'
|
||||
- 'spec/services/packages/npm/create_tag_service_spec.rb'
|
||||
- 'spec/services/packages/npm/generate_metadata_service_spec.rb'
|
||||
- 'spec/services/packages/nuget/create_dependency_service_spec.rb'
|
||||
|
|
|
|||
|
|
@ -685,7 +685,6 @@ Style/InlineDisableAnnotation:
|
|||
- 'app/services/packages/create_package_service.rb'
|
||||
- 'app/services/packages/debian/generate_distribution_key_service.rb'
|
||||
- 'app/services/packages/debian/generate_distribution_service.rb'
|
||||
- 'app/services/packages/npm/create_package_service.rb'
|
||||
- 'app/services/packages/nuget/create_dependency_service.rb'
|
||||
- 'app/services/packages/nuget/extract_remote_metadata_file_service.rb'
|
||||
- 'app/services/packages/nuget/process_package_file_service.rb'
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@
|
|||
// https://gitlab.com/gitlab-org/gitlab/-/issues/420777
|
||||
// https://gitlab.com/gitlab-org/gitlab/-/issues/421441
|
||||
|
||||
import { organizationProjects } from 'ee_else_ce/organizations/mock_projects';
|
||||
|
||||
export { organizationProjects };
|
||||
|
||||
export const defaultOrganization = {
|
||||
id: 1,
|
||||
name: 'Default',
|
||||
|
|
@ -40,154 +44,6 @@ export const organizations = [
|
|||
},
|
||||
];
|
||||
|
||||
export const organizationProjects = [
|
||||
{
|
||||
id: 'gid://gitlab/Project/8',
|
||||
nameWithNamespace: 'Twitter / Typeahead.Js',
|
||||
webUrl: 'http://127.0.0.1:3000/twitter/Typeahead.Js',
|
||||
topics: ['JavaScript', 'Vue.js', 'GraphQL', 'Jest', 'CSS', 'HTML'],
|
||||
forksCount: 4,
|
||||
avatarUrl: null,
|
||||
starCount: 0,
|
||||
visibility: 'public',
|
||||
openMergeRequestsCount: 5,
|
||||
openIssuesCount: 48,
|
||||
descriptionHtml:
|
||||
'<p data-sourcepos="1:1-1:59" dir="auto">Optio et reprehenderit enim doloremque deserunt et commodi. Sed sit amet iaculis neque. Morbi vel convallis elit. Aliquam vitae arcu orci. Aenean sem velit, dapibus eget enim id, tempor lobortis orci. Pellentesque dignissim nec velit eget sagittis. Maecenas lectus sapien, tincidunt ac cursus a, aliquam eu ipsum. Aliquam posuere maximus augue, ut vehicula elit vulputate condimentum. In libero leo, vehicula nec risus in, ullamcorper convallis risus. Phasellus sit amet lectus sit amet sem volutpat cursus. Nullam facilisis nulla nec lacus pretium, in pretium ex aliquam.</p>',
|
||||
mergeRequestsAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
issuesAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
forkingAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
userPermissions: {
|
||||
removeProject: true,
|
||||
},
|
||||
maxAccessLevel: {
|
||||
integerValue: 30,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'gid://gitlab/Project/7',
|
||||
nameWithNamespace: 'Flightjs / Flight',
|
||||
webUrl: 'http://127.0.0.1:3000/flightjs/Flight',
|
||||
topics: [],
|
||||
forksCount: 0,
|
||||
avatarUrl: null,
|
||||
starCount: 0,
|
||||
visibility: 'private',
|
||||
openMergeRequestsCount: 10,
|
||||
openIssuesCount: 37,
|
||||
descriptionHtml:
|
||||
'<p data-sourcepos="1:1-1:49" dir="auto">Dolor dicta rerum et ut eius voluptate earum qui.</p>',
|
||||
mergeRequestsAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
issuesAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
forkingAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
userPermissions: {
|
||||
removeProject: true,
|
||||
},
|
||||
maxAccessLevel: {
|
||||
integerValue: 30,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'gid://gitlab/Project/6',
|
||||
nameWithNamespace: 'Jashkenas / Underscore',
|
||||
webUrl: 'http://127.0.0.1:3000/jashkenas/Underscore',
|
||||
topics: [],
|
||||
forksCount: 0,
|
||||
avatarUrl: null,
|
||||
starCount: 0,
|
||||
visibility: 'private',
|
||||
openMergeRequestsCount: 0,
|
||||
openIssuesCount: 34,
|
||||
descriptionHtml:
|
||||
'<p data-sourcepos="1:1-1:52" dir="auto">Incidunt est aliquam autem nihil eveniet quis autem.</p>',
|
||||
mergeRequestsAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
issuesAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
forkingAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
userPermissions: {
|
||||
removeProject: true,
|
||||
},
|
||||
maxAccessLevel: {
|
||||
integerValue: 30,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'gid://gitlab/Project/5',
|
||||
nameWithNamespace: 'Commit451 / Lab Coat',
|
||||
webUrl: 'http://127.0.0.1:3000/Commit451/lab-coat',
|
||||
topics: [],
|
||||
forksCount: 0,
|
||||
avatarUrl: null,
|
||||
starCount: 0,
|
||||
visibility: 'internal',
|
||||
openMergeRequestsCount: 3,
|
||||
openIssuesCount: 49,
|
||||
descriptionHtml:
|
||||
'<p data-sourcepos="1:1-1:34" dir="auto">Sint eos dolorem impedit rerum et.</p>',
|
||||
mergeRequestsAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
issuesAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
forkingAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
userPermissions: {
|
||||
removeProject: true,
|
||||
},
|
||||
maxAccessLevel: {
|
||||
integerValue: 30,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'gid://gitlab/Project/1',
|
||||
nameWithNamespace: 'Toolbox / Gitlab Smoke Tests',
|
||||
webUrl: 'http://127.0.0.1:3000/toolbox/gitlab-smoke-tests',
|
||||
topics: [],
|
||||
forksCount: 0,
|
||||
avatarUrl: null,
|
||||
starCount: 0,
|
||||
visibility: 'internal',
|
||||
openMergeRequestsCount: 20,
|
||||
openIssuesCount: 34,
|
||||
descriptionHtml:
|
||||
'<p data-sourcepos="1:1-1:40" dir="auto">Veritatis error laboriosam libero autem.</p>',
|
||||
mergeRequestsAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
issuesAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
forkingAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
userPermissions: {
|
||||
removeProject: false,
|
||||
},
|
||||
maxAccessLevel: {
|
||||
integerValue: 30,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export const organizationGroups = [
|
||||
{
|
||||
id: 'gid://gitlab/Group/29',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,163 @@
|
|||
/* eslint-disable @gitlab/require-i18n-strings */
|
||||
|
||||
// This is temporary mock data that will be removed when completing the following:
|
||||
// https://gitlab.com/gitlab-org/gitlab/-/issues/420777
|
||||
// https://gitlab.com/gitlab-org/gitlab/-/issues/421441
|
||||
|
||||
export const organizationProjects = [
|
||||
{
|
||||
id: 'gid://gitlab/Project/8',
|
||||
nameWithNamespace: 'Twitter / Typeahead.Js',
|
||||
webUrl: 'http://127.0.0.1:3000/twitter/Typeahead.Js',
|
||||
topics: ['JavaScript', 'Vue.js', 'GraphQL', 'Jest', 'CSS', 'HTML'],
|
||||
forksCount: 4,
|
||||
avatarUrl: null,
|
||||
starCount: 0,
|
||||
visibility: 'public',
|
||||
openMergeRequestsCount: 5,
|
||||
openIssuesCount: 48,
|
||||
descriptionHtml:
|
||||
'<p data-sourcepos="1:1-1:59" dir="auto">Optio et reprehenderit enim doloremque deserunt et commodi. Sed sit amet iaculis neque. Morbi vel convallis elit. Aliquam vitae arcu orci. Aenean sem velit, dapibus eget enim id, tempor lobortis orci. Pellentesque dignissim nec velit eget sagittis. Maecenas lectus sapien, tincidunt ac cursus a, aliquam eu ipsum. Aliquam posuere maximus augue, ut vehicula elit vulputate condimentum. In libero leo, vehicula nec risus in, ullamcorper convallis risus. Phasellus sit amet lectus sit amet sem volutpat cursus. Nullam facilisis nulla nec lacus pretium, in pretium ex aliquam.</p>',
|
||||
archived: false,
|
||||
mergeRequestsAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
issuesAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
forkingAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
userPermissions: {
|
||||
removeProject: true,
|
||||
},
|
||||
maxAccessLevel: {
|
||||
integerValue: 30,
|
||||
},
|
||||
__typename: 'Project',
|
||||
},
|
||||
{
|
||||
id: 'gid://gitlab/Project/7',
|
||||
nameWithNamespace: 'Flightjs / Flight',
|
||||
webUrl: 'http://127.0.0.1:3000/flightjs/Flight',
|
||||
topics: [],
|
||||
forksCount: 0,
|
||||
avatarUrl: null,
|
||||
starCount: 0,
|
||||
visibility: 'private',
|
||||
openMergeRequestsCount: 10,
|
||||
openIssuesCount: 37,
|
||||
descriptionHtml:
|
||||
'<p data-sourcepos="1:1-1:49" dir="auto">Dolor dicta rerum et ut eius voluptate earum qui.</p>',
|
||||
archived: false,
|
||||
mergeRequestsAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
issuesAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
forkingAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
userPermissions: {
|
||||
removeProject: true,
|
||||
},
|
||||
maxAccessLevel: {
|
||||
integerValue: 30,
|
||||
},
|
||||
__typename: 'Project',
|
||||
},
|
||||
{
|
||||
id: 'gid://gitlab/Project/6',
|
||||
nameWithNamespace: 'Jashkenas / Underscore',
|
||||
webUrl: 'http://127.0.0.1:3000/jashkenas/Underscore',
|
||||
topics: [],
|
||||
forksCount: 0,
|
||||
avatarUrl: null,
|
||||
starCount: 0,
|
||||
visibility: 'private',
|
||||
openMergeRequestsCount: 0,
|
||||
openIssuesCount: 34,
|
||||
descriptionHtml:
|
||||
'<p data-sourcepos="1:1-1:52" dir="auto">Incidunt est aliquam autem nihil eveniet quis autem.</p>',
|
||||
archived: false,
|
||||
mergeRequestsAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
issuesAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
forkingAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
userPermissions: {
|
||||
removeProject: true,
|
||||
},
|
||||
maxAccessLevel: {
|
||||
integerValue: 30,
|
||||
},
|
||||
__typename: 'Project',
|
||||
},
|
||||
{
|
||||
id: 'gid://gitlab/Project/5',
|
||||
nameWithNamespace: 'Commit451 / Lab Coat',
|
||||
webUrl: 'http://127.0.0.1:3000/Commit451/lab-coat',
|
||||
topics: [],
|
||||
forksCount: 0,
|
||||
avatarUrl: null,
|
||||
starCount: 0,
|
||||
visibility: 'internal',
|
||||
openMergeRequestsCount: 3,
|
||||
openIssuesCount: 49,
|
||||
descriptionHtml:
|
||||
'<p data-sourcepos="1:1-1:34" dir="auto">Sint eos dolorem impedit rerum et.</p>',
|
||||
archived: true,
|
||||
mergeRequestsAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
issuesAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
forkingAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
userPermissions: {
|
||||
removeProject: true,
|
||||
},
|
||||
maxAccessLevel: {
|
||||
integerValue: 30,
|
||||
},
|
||||
__typename: 'Project',
|
||||
},
|
||||
{
|
||||
id: 'gid://gitlab/Project/1',
|
||||
nameWithNamespace: 'Toolbox / Gitlab Smoke Tests',
|
||||
webUrl: 'http://127.0.0.1:3000/toolbox/gitlab-smoke-tests',
|
||||
topics: [],
|
||||
forksCount: 0,
|
||||
avatarUrl: null,
|
||||
starCount: 0,
|
||||
visibility: 'internal',
|
||||
openMergeRequestsCount: 20,
|
||||
openIssuesCount: 34,
|
||||
descriptionHtml:
|
||||
'<p data-sourcepos="1:1-1:40" dir="auto">Veritatis error laboriosam libero autem.</p>',
|
||||
archived: false,
|
||||
mergeRequestsAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
issuesAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
forkingAccessLevel: {
|
||||
stringValue: 'ENABLED',
|
||||
},
|
||||
userPermissions: {
|
||||
removeProject: false,
|
||||
},
|
||||
maxAccessLevel: {
|
||||
integerValue: 30,
|
||||
},
|
||||
__typename: 'Project',
|
||||
},
|
||||
];
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
fragment BaseProject on Project {
|
||||
id
|
||||
archived
|
||||
nameWithNamespace
|
||||
webUrl
|
||||
topics
|
||||
forksCount
|
||||
avatarUrl
|
||||
starCount
|
||||
visibility
|
||||
openMergeRequestsCount
|
||||
openIssuesCount
|
||||
descriptionHtml
|
||||
mergeRequestsAccessLevel {
|
||||
stringValue
|
||||
}
|
||||
issuesAccessLevel {
|
||||
stringValue
|
||||
}
|
||||
forkingAccessLevel {
|
||||
stringValue
|
||||
}
|
||||
userPermissions {
|
||||
removeProject
|
||||
}
|
||||
maxAccessLevel {
|
||||
integerValue
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
#import "./base_project.fragment.graphql"
|
||||
|
||||
fragment Project on Project {
|
||||
...BaseProject
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
#import "~/graphql_shared/fragments/page_info.fragment.graphql"
|
||||
#import "ee_else_ce/organizations/shared/graphql/fragments/project.fragment.graphql"
|
||||
|
||||
query getOrganizationProjects(
|
||||
$id: OrganizationsOrganizationID!
|
||||
|
|
@ -11,32 +12,7 @@ query getOrganizationProjects(
|
|||
id
|
||||
projects(first: $first, last: $last, before: $before, after: $after) {
|
||||
nodes {
|
||||
id
|
||||
nameWithNamespace
|
||||
webUrl
|
||||
topics
|
||||
forksCount
|
||||
avatarUrl
|
||||
starCount
|
||||
visibility
|
||||
openMergeRequestsCount
|
||||
openIssuesCount
|
||||
descriptionHtml
|
||||
mergeRequestsAccessLevel {
|
||||
stringValue
|
||||
}
|
||||
issuesAccessLevel {
|
||||
stringValue
|
||||
}
|
||||
forkingAccessLevel {
|
||||
stringValue
|
||||
}
|
||||
userPermissions {
|
||||
removeProject
|
||||
}
|
||||
maxAccessLevel {
|
||||
integerValue
|
||||
}
|
||||
...Project
|
||||
}
|
||||
pageInfo {
|
||||
...PageInfo
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
import { GlButton, GlModal, GlModalDirective } from '@gitlab/ui';
|
||||
import { escape } from 'lodash';
|
||||
import { s__, __, sprintf } from '~/locale';
|
||||
import { isTemplate } from '../utils';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -15,23 +16,23 @@ export default {
|
|||
deleteWikiUrl: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
pageTitle: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
csrfToken: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
isTemplate,
|
||||
title() {
|
||||
return sprintf(
|
||||
s__('WikiPageConfirmDelete|Delete page %{pageTitle}?'),
|
||||
this.isTemplate
|
||||
? this.$options.i18n.deleteTemplateTitle
|
||||
: this.$options.i18n.deletePageTitle,
|
||||
{
|
||||
pageTitle: escape(this.pageTitle),
|
||||
},
|
||||
|
|
@ -40,13 +41,23 @@ export default {
|
|||
},
|
||||
primaryProps() {
|
||||
return {
|
||||
text: this.$options.i18n.deletePageText,
|
||||
text: this.isTemplate
|
||||
? this.$options.i18n.deleteTemplateText
|
||||
: this.$options.i18n.deletePageText,
|
||||
attributes: {
|
||||
variant: 'danger',
|
||||
'data-testid': 'confirm-deletion-button',
|
||||
},
|
||||
};
|
||||
},
|
||||
deleteTemplateText() {
|
||||
return this.isTemplate
|
||||
? this.$options.i18n.deleteTemplateText
|
||||
: this.$options.i18n.deletePageText;
|
||||
},
|
||||
modalBody() {
|
||||
return this.isTemplate ? this.$options.i18n.modalBodyTemplate : this.$options.i18n.modalBody;
|
||||
},
|
||||
cancelProps() {
|
||||
return {
|
||||
text: this.$options.i18n.cancelButtonText,
|
||||
|
|
@ -60,8 +71,12 @@ export default {
|
|||
},
|
||||
},
|
||||
i18n: {
|
||||
deletePageTitle: s__('WikiPageConfirmDelete|Delete page "%{pageTitle}"?'),
|
||||
deleteTemplateTitle: s__('WikiPageConfirmDelete|Delete template "%{pageTitle}"?'),
|
||||
deletePageText: s__('WikiPageConfirmDelete|Delete page'),
|
||||
deleteTemplateText: s__('WikiPageConfirmDelete|Delete template'),
|
||||
modalBody: s__('WikiPageConfirmDelete|Are you sure you want to delete this page?'),
|
||||
modalBodyTemplate: s__('WikiPageConfirmDelete|Are you sure you want to delete this template?'),
|
||||
cancelButtonText: __('Cancel'),
|
||||
},
|
||||
modal: {
|
||||
|
|
@ -78,7 +93,7 @@ export default {
|
|||
variant="danger"
|
||||
data-testid="delete-button"
|
||||
>
|
||||
{{ $options.i18n.deletePageText }}
|
||||
{{ deleteTemplateText }}
|
||||
</gl-button>
|
||||
<gl-modal
|
||||
:title="title"
|
||||
|
|
@ -88,7 +103,7 @@ export default {
|
|||
size="sm"
|
||||
@ok="onSubmit"
|
||||
>
|
||||
{{ $options.i18n.modalBody }}
|
||||
{{ modalBody }}
|
||||
<form ref="form" :action="deleteWikiUrl" method="post" class="js-requires-input">
|
||||
<input ref="method" type="hidden" name="_method" value="delete" />
|
||||
<input :value="csrfToken" type="hidden" name="authenticity_token" />
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ import {
|
|||
WIKI_FORMAT_UPDATED_ACTION,
|
||||
CONTENT_EDITOR_LOADED_ACTION,
|
||||
} from '../constants';
|
||||
import { isTemplate } from '../utils';
|
||||
import WikiTemplate from './wiki_template.vue';
|
||||
|
||||
const trackingMixin = Tracking.mixin({
|
||||
label: WIKI_CONTENT_EDITOR_TRACKING_LABEL,
|
||||
|
|
@ -62,6 +64,7 @@ export default {
|
|||
title: {
|
||||
label: s__('WikiPage|Title'),
|
||||
placeholder: s__('WikiPage|Page title'),
|
||||
templatePlaceholder: s__('WikiPage|Template title'),
|
||||
helpText: {
|
||||
existingPage: s__(
|
||||
'WikiPage|Tip: You can move this page by adding the path to the beginning of the title.',
|
||||
|
|
@ -87,11 +90,14 @@ export default {
|
|||
value: {
|
||||
existingPage: s__('WikiPage|Update %{pageTitle}'),
|
||||
newPage: s__('WikiPage|Create %{pageTitle}'),
|
||||
existingTemplate: s__('WikiPage|Update template %{pageTitle}'),
|
||||
newTemplatePage: s__('WikiPage|Create template %{pageTitle}'),
|
||||
},
|
||||
},
|
||||
submitButton: {
|
||||
existingPage: s__('WikiPage|Save changes'),
|
||||
newPage: s__('WikiPage|Create page'),
|
||||
newTemplate: s__('WikiPage|Create template'),
|
||||
},
|
||||
cancel: s__('WikiPage|Cancel'),
|
||||
},
|
||||
|
|
@ -105,13 +111,16 @@ export default {
|
|||
GlLink,
|
||||
GlButton,
|
||||
MarkdownEditor,
|
||||
WikiTemplate,
|
||||
},
|
||||
mixins: [trackingMixin],
|
||||
inject: ['formatOptions', 'pageInfo', 'drawioUrl'],
|
||||
inject: ['formatOptions', 'pageInfo', 'drawioUrl', 'templates'],
|
||||
data() {
|
||||
const title = window.location.href.includes('random_title=true') ? '' : getTitle(this.pageInfo);
|
||||
return {
|
||||
editingMode: 'source',
|
||||
title: getTitle(this.pageInfo),
|
||||
title,
|
||||
pageTitle: title.replace('templates/', ''),
|
||||
format: getFormat(this.pageInfo),
|
||||
content: getContent(this.pageInfo),
|
||||
commitMessage: getCommitMessage(this.pageInfo),
|
||||
|
|
@ -124,10 +133,17 @@ export default {
|
|||
'aria-label': this.$options.i18n.content.label,
|
||||
id: 'wiki_content',
|
||||
name: 'wiki[content]',
|
||||
class: 'note-textarea',
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isTemplate,
|
||||
titlePlaceholder() {
|
||||
return this.isTemplate
|
||||
? this.$options.i18n.title.templatePlaceholder
|
||||
: this.$options.i18n.title.placeholder;
|
||||
},
|
||||
autocompleteDataSources() {
|
||||
return gl.GfmAutoComplete?.dataSources;
|
||||
},
|
||||
|
|
@ -147,9 +163,12 @@ export default {
|
|||
);
|
||||
},
|
||||
commitMessageI18n() {
|
||||
return this.pageInfo.persisted
|
||||
? this.$options.i18n.commitMessage.value.existingPage
|
||||
: this.$options.i18n.commitMessage.value.newPage;
|
||||
if (this.pageInfo.persisted) {
|
||||
if (this.isTemplate) return this.$options.i18n.commitMessage.value.existingTemplate;
|
||||
return this.$options.i18n.commitMessage.value.existingPage;
|
||||
}
|
||||
if (this.isTemplate) return this.$options.i18n.commitMessage.value.newTemplatePage;
|
||||
return this.$options.i18n.commitMessage.value.newPage;
|
||||
},
|
||||
linkExample() {
|
||||
return MARKDOWN_LINK_TEXT[this.format];
|
||||
|
|
@ -191,6 +210,9 @@ export default {
|
|||
title() {
|
||||
this.updateCommitMessage();
|
||||
},
|
||||
pageTitle() {
|
||||
this.title = this.isTemplate ? `templates/${this.pageTitle}` : this.pageTitle;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (!this.commitMessage) this.updateCommitMessage();
|
||||
|
|
@ -246,7 +268,7 @@ export default {
|
|||
if (!this.title) return;
|
||||
|
||||
// Replace hyphens with spaces
|
||||
const newTitle = this.title.replace(/-+/g, ' ');
|
||||
const newTitle = this.title.replace(/-+/g, ' ').replace('templates/', '');
|
||||
|
||||
const newCommitMessage = sprintf(this.commitMessageI18n, { pageTitle: newTitle }, false);
|
||||
this.commitMessage = newCommitMessage;
|
||||
|
|
@ -284,6 +306,10 @@ export default {
|
|||
submitFormWithShortcut() {
|
||||
this.$refs.form.submit();
|
||||
},
|
||||
|
||||
setTemplate(template) {
|
||||
this.$refs.markdownEditor.setTemplate(template);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -309,7 +335,7 @@ export default {
|
|||
<div class="row">
|
||||
<div class="col-12">
|
||||
<gl-form-group :label="$options.i18n.title.label" label-for="wiki_title">
|
||||
<template #description>
|
||||
<template v-if="!isTemplate" #description>
|
||||
<gl-icon class="gl-mr-n1" name="bulb" />
|
||||
{{ titleHelpText }}
|
||||
<gl-link :href="helpPath" target="_blank">
|
||||
|
|
@ -318,15 +344,15 @@ export default {
|
|||
</template>
|
||||
<gl-form-input
|
||||
id="wiki_title"
|
||||
v-model="title"
|
||||
name="wiki[title]"
|
||||
v-model="pageTitle"
|
||||
type="text"
|
||||
class="form-control"
|
||||
data-testid="wiki-title-textbox"
|
||||
:required="true"
|
||||
:autofocus="!pageInfo.persisted"
|
||||
:placeholder="$options.i18n.title.placeholder"
|
||||
:placeholder="titlePlaceholder"
|
||||
/>
|
||||
<input v-model="title" type="hidden" name="wiki[title]" />
|
||||
</gl-form-group>
|
||||
</div>
|
||||
|
||||
|
|
@ -350,8 +376,16 @@ export default {
|
|||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 row-sm-5">
|
||||
<gl-form-group>
|
||||
<gl-form-group :label="$options.i18n.content.label" label-for="wiki_content">
|
||||
<wiki-template
|
||||
v-if="!isTemplate && templates.length"
|
||||
:format="format"
|
||||
:templates="templates"
|
||||
class="gl-mb-4"
|
||||
@input="setTemplate"
|
||||
/>
|
||||
<markdown-editor
|
||||
ref="markdownEditor"
|
||||
v-model="content"
|
||||
:form-field-props="formFieldProps"
|
||||
:render-markdown-path="pageInfo.markdownPreviewPath"
|
||||
|
|
@ -363,6 +397,7 @@ export default {
|
|||
:enable-autocomplete="true"
|
||||
:autocomplete-data-sources="autocompleteDataSources"
|
||||
:drawio-enabled="drawioEnabled"
|
||||
:disable-attachments="isTemplate"
|
||||
@contentEditor="notifyContentEditorActive"
|
||||
@markdownField="notifyContentEditorInactive"
|
||||
@keydown.ctrl.enter="submitFormWithShortcut"
|
||||
|
|
@ -370,7 +405,7 @@ export default {
|
|||
/>
|
||||
<div class="form-text gl-text-gray-600">
|
||||
<gl-sprintf
|
||||
v-if="displayWikiSpecificMarkdownHelp"
|
||||
v-if="displayWikiSpecificMarkdownHelp && !isTemplate"
|
||||
:message="$options.i18n.linksHelpText"
|
||||
>
|
||||
<template #linkExample>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
import { GlDisclosureDropdown } from '@gitlab/ui';
|
||||
import { s__, __ } from '~/locale';
|
||||
import printMarkdownDom from '~/lib/print_markdown_dom';
|
||||
import { isTemplate } from '../utils';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -9,12 +10,13 @@ export default {
|
|||
},
|
||||
inject: ['print', 'history'],
|
||||
computed: {
|
||||
isTemplate,
|
||||
dropdownItems() {
|
||||
const items = [];
|
||||
|
||||
if (this.history) {
|
||||
items.push({
|
||||
text: s__('Wiki|Page history'),
|
||||
text: this.isTemplate ? s__('Wiki|Template history') : s__('Wiki|Page history'),
|
||||
href: this.history,
|
||||
extraAttrs: {
|
||||
'data-testid': 'page-history-button',
|
||||
|
|
@ -22,7 +24,7 @@ export default {
|
|||
});
|
||||
}
|
||||
|
||||
if (this.print) {
|
||||
if (this.print && !this.isTemplate) {
|
||||
items.push({
|
||||
text: __('Print as PDF'),
|
||||
action: this.printPage,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,92 @@
|
|||
<script>
|
||||
import { GlCollapsibleListbox } from '@gitlab/ui';
|
||||
import { __, sprintf } from '~/locale';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import SafeHtml from '~/vue_shared/directives/safe_html';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
GlCollapsibleListbox,
|
||||
},
|
||||
directives: {
|
||||
SafeHtml,
|
||||
},
|
||||
props: {
|
||||
templates: {
|
||||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
format: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchTerm: '',
|
||||
selectedTemplate: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
templatesList() {
|
||||
return this.templates
|
||||
.filter((template) => template.format === this.format)
|
||||
.map((template) => ({
|
||||
text: template.title,
|
||||
value: `${template.path}/raw`,
|
||||
}))
|
||||
.filter(({ text }) => text.toLowerCase().includes(this.searchTerm.toLowerCase()));
|
||||
},
|
||||
toggleText() {
|
||||
const selectedTemplateLabel = this.templatesList.find(
|
||||
({ value }) => value === this.selectedTemplate,
|
||||
)?.text;
|
||||
|
||||
return selectedTemplateLabel
|
||||
? sprintf(__('Template: %{title}'), { title: selectedTemplateLabel })
|
||||
: __('Choose a template');
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
filterTemplates(searchTerm) {
|
||||
this.searchTerm = searchTerm;
|
||||
},
|
||||
async selectTemplate(templatePath) {
|
||||
const template = await axios.get(templatePath);
|
||||
this.$emit('input', template.data);
|
||||
},
|
||||
highlight(text) {
|
||||
return this.searchTerm
|
||||
? String(text).replace(
|
||||
new RegExp(this.searchTerm, 'i'),
|
||||
(match) => `<strong>${match}</strong>`,
|
||||
)
|
||||
: text;
|
||||
},
|
||||
},
|
||||
i18n: {
|
||||
searchTemplates: __('Search templates'),
|
||||
noMatchingTemplates: __('No matching templates'),
|
||||
chooseTemplate: __('Choose a template'),
|
||||
},
|
||||
safeHtmlConfig: { ALLOWED_TAGS: ['strong'] },
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<gl-collapsible-listbox
|
||||
v-model="selectedTemplate"
|
||||
:items="templatesList"
|
||||
searchable
|
||||
:toggle-text="toggleText"
|
||||
:search-placeholder="$options.i18n.searchTemplates"
|
||||
:no-results-text="$options.i18n.noMatchingTemplates"
|
||||
:header-text="$options.i18n.chooseTemplate"
|
||||
@search="filterTemplates"
|
||||
@select="selectTemplate"
|
||||
>
|
||||
<template #list-item="{ item }">
|
||||
<span v-safe-html:safeHtmlConfig="highlight(item.text)"> </span>
|
||||
</template>
|
||||
</gl-collapsible-listbox>
|
||||
</template>
|
||||
|
|
@ -64,7 +64,7 @@ const createWikiFormApp = () => {
|
|||
const el = document.getElementById('js-wiki-form');
|
||||
|
||||
if (el) {
|
||||
const { pageInfo, formatOptions } = el.dataset;
|
||||
const { pageInfo, formatOptions, templates } = el.dataset;
|
||||
|
||||
Vue.use(VueApollo);
|
||||
|
||||
|
|
@ -78,6 +78,7 @@ const createWikiFormApp = () => {
|
|||
formatOptions: JSON.parse(formatOptions),
|
||||
pageInfo: convertObjectPropsToCamelCase(JSON.parse(pageInfo)),
|
||||
drawioUrl: gon.diagramsnet_url,
|
||||
templates: JSON.parse(templates),
|
||||
},
|
||||
render(createElement) {
|
||||
return createElement(wikiForm);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
export function isTemplate() {
|
||||
return window.location.href.includes('/wikis/templates/');
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
<script>
|
||||
import { GlAlert } from '@gitlab/ui';
|
||||
import Autosize from 'autosize';
|
||||
import { __ } from '~/locale';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import LocalStorageSync from '~/vue_shared/components/local_storage_sync.vue';
|
||||
import { updateDraft, clearDraft, getDraft } from '~/lib/utils/autosave';
|
||||
|
|
@ -31,6 +33,7 @@ async function waitFor(getEl, interval = 10, timeout = 2000) {
|
|||
|
||||
export default {
|
||||
components: {
|
||||
GlAlert,
|
||||
LocalStorageSync,
|
||||
MarkdownField,
|
||||
ContentEditor: () =>
|
||||
|
|
@ -122,6 +125,7 @@ export default {
|
|||
const editingMode =
|
||||
localStorage.getItem(this.$options.EDITING_MODE_KEY) || EDITING_MODE_MARKDOWN_FIELD;
|
||||
return {
|
||||
alert: null,
|
||||
markdown: this.value || (this.autosaveKey ? getDraft(this.autosaveKey) : '') || '',
|
||||
editingMode,
|
||||
autofocused: false,
|
||||
|
|
@ -174,6 +178,27 @@ export default {
|
|||
this.saveDraft();
|
||||
this.autosizeTextarea();
|
||||
},
|
||||
setTemplate(template, force = false) {
|
||||
if (!this.markdown || force) {
|
||||
this.setValue(template);
|
||||
} else {
|
||||
const dismiss = () => {
|
||||
this.alert = null;
|
||||
};
|
||||
this.alert = {
|
||||
message: this.$options.i18n.applyTemplateAlert.message,
|
||||
variant: 'warning',
|
||||
primaryButtonText: this.$options.i18n.applyTemplateAlert.primaryButtonText,
|
||||
secondaryButtonText: this.$options.i18n.applyTemplateAlert.secondaryButtonText,
|
||||
primaryAction: () => {
|
||||
this.setValue(template, true);
|
||||
dismiss();
|
||||
},
|
||||
secondaryAction: dismiss,
|
||||
dismiss,
|
||||
};
|
||||
}
|
||||
},
|
||||
updateMarkdownFromContentEditor({ markdown }) {
|
||||
this.markdown = markdown;
|
||||
this.$emit('input', markdown);
|
||||
|
|
@ -257,6 +282,15 @@ export default {
|
|||
},
|
||||
},
|
||||
EDITING_MODE_KEY,
|
||||
i18n: {
|
||||
applyTemplateAlert: {
|
||||
message: __(
|
||||
'Applying a template will replace the existing content. Any changes you have made will be lost.',
|
||||
),
|
||||
primaryButtonText: __('Apply template'),
|
||||
secondaryButtonText: __('Cancel'),
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
|
|
@ -267,6 +301,18 @@ export default {
|
|||
:storage-key="$options.EDITING_MODE_KEY"
|
||||
@input="onEditingModeRestored"
|
||||
/>
|
||||
<gl-alert
|
||||
v-if="alert"
|
||||
class="gl-mb-4"
|
||||
:variant="alert.variant"
|
||||
:primary-button-text="alert.primaryButtonText"
|
||||
:secondary-button-text="alert.secondaryButtonText"
|
||||
@primaryAction="alert.primaryAction"
|
||||
@secondaryAction="alert.secondaryAction"
|
||||
@dismiss="alert.dismiss"
|
||||
>
|
||||
{{ alert.message }}
|
||||
</gl-alert>
|
||||
<markdown-field
|
||||
v-if="!isContentEditorActive"
|
||||
ref="markdownField"
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ export default {
|
|||
forks: __('Forks'),
|
||||
issues: __('Issues'),
|
||||
mergeRequests: __('Merge requests'),
|
||||
pendingDeletion: __('Pending deletion'),
|
||||
archived: __('Archived'),
|
||||
topics: __('Topics'),
|
||||
topicsPopoverTargetText: __('+ %{count} more'),
|
||||
|
|
@ -201,6 +202,26 @@ export default {
|
|||
isActionDeleteLoading() {
|
||||
return this.project.actionLoadingStates[ACTION_DELETE];
|
||||
},
|
||||
isPendingDeletion() {
|
||||
return Boolean(this.project.markedForDeletionOn);
|
||||
},
|
||||
inactiveBadge() {
|
||||
if (this.isPendingDeletion) {
|
||||
return {
|
||||
variant: 'warning',
|
||||
text: this.$options.i18n.pendingDeletion,
|
||||
};
|
||||
}
|
||||
|
||||
if (this.project.archived) {
|
||||
return {
|
||||
variant: 'info',
|
||||
text: this.$options.i18n.archived,
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
topicPath(topic) {
|
||||
|
|
@ -332,9 +353,13 @@ export default {
|
|||
:class="showProjectIcon ? 'gl-pl-12' : 'gl-pl-10'"
|
||||
>
|
||||
<div class="gl-display-flex gl-align-items-center gl-gap-x-3 gl-md-h-9">
|
||||
<gl-badge v-if="project.archived" variant="warning">{{
|
||||
$options.i18n.archived
|
||||
}}</gl-badge>
|
||||
<gl-badge
|
||||
v-if="inactiveBadge"
|
||||
:variant="inactiveBadge.variant"
|
||||
size="sm"
|
||||
data-testid="inactive-badge"
|
||||
>{{ inactiveBadge.text }}</gl-badge
|
||||
>
|
||||
<gl-link
|
||||
v-gl-tooltip="$options.i18n.stars"
|
||||
:href="starsHref"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ module WikiActions
|
|||
include ProductAnalyticsTracking
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
RESCUE_GIT_TIMEOUTS_IN = %w[show edit history diff pages].freeze
|
||||
RESCUE_GIT_TIMEOUTS_IN = %w[show raw edit history diff pages templates].freeze
|
||||
|
||||
included do
|
||||
content_security_policy do |p|
|
||||
|
|
@ -70,10 +70,34 @@ module WikiActions
|
|||
|
||||
# rubocop:disable Gitlab/ModuleWithInstanceVariables
|
||||
def pages
|
||||
@wiki_entries = WikiDirectory.group_pages(wiki_pages)
|
||||
@wiki_entries = WikiDirectory.group_pages(pages_list)
|
||||
|
||||
render 'shared/wikis/pages'
|
||||
end
|
||||
|
||||
def pages_list
|
||||
strong_memoize(:pages_list) do
|
||||
Kaminari.paginate_array(
|
||||
# only include pages not starting with 'templates/'
|
||||
wiki_pages.reject { |page| page.slug.start_with?('templates/') }
|
||||
).page(params[:page])
|
||||
end
|
||||
end
|
||||
|
||||
def templates_list
|
||||
strong_memoize(:templates_list) do
|
||||
Kaminari.paginate_array(
|
||||
# only include pages starting with 'templates/'
|
||||
wiki_pages.select { |page| page.slug.start_with?('templates/') }
|
||||
).page(params[:page])
|
||||
end
|
||||
end
|
||||
|
||||
def templates
|
||||
@wiki_entries = WikiDirectory.group_pages(templates_list, templates: true)
|
||||
|
||||
render 'shared/wikis/templates'
|
||||
end
|
||||
# rubocop:enable Gitlab/ModuleWithInstanceVariables
|
||||
|
||||
# `#show` handles a number of scenarios:
|
||||
|
|
@ -100,23 +124,28 @@ module WikiActions
|
|||
# This is needed by [GitLab JH](https://gitlab.com/gitlab-jh/gitlab/-/issues/247)
|
||||
send_wiki_file_blob(wiki, file_blob)
|
||||
elsif show_create_form?
|
||||
# Assign a title to the WikiPage unless `id` is a randomly generated slug from #new
|
||||
title = params[:id] unless params[:random_title].present?
|
||||
title = params[:id]
|
||||
|
||||
@page = build_page(title: title)
|
||||
@templates = templates_list
|
||||
|
||||
render 'shared/wikis/edit'
|
||||
else
|
||||
render 'shared/wikis/empty'
|
||||
end
|
||||
end
|
||||
# rubocop:enable Gitlab/ModuleWithInstanceVariables
|
||||
|
||||
def raw
|
||||
response.headers['Content-Type'] = 'text/plain'
|
||||
render plain: page.raw_content
|
||||
end
|
||||
|
||||
def edit
|
||||
@templates = templates_list
|
||||
|
||||
render 'shared/wikis/edit'
|
||||
end
|
||||
|
||||
# rubocop:disable Gitlab/ModuleWithInstanceVariables
|
||||
def update
|
||||
return render('shared/wikis/empty') unless can?(current_user, :create_wiki, container)
|
||||
|
||||
|
|
@ -135,6 +164,8 @@ module WikiActions
|
|||
)
|
||||
else
|
||||
@error = response.message
|
||||
@templates = templates_list
|
||||
|
||||
render 'shared/wikis/edit'
|
||||
end
|
||||
end
|
||||
|
|
@ -152,6 +183,8 @@ module WikiActions
|
|||
wiki_page_path(wiki, page)
|
||||
)
|
||||
else
|
||||
@templates = templates_list
|
||||
|
||||
render 'shared/wikis/edit'
|
||||
end
|
||||
end
|
||||
|
|
@ -198,6 +231,8 @@ module WikiActions
|
|||
redirect_to wiki_path(wiki), status: :found
|
||||
else
|
||||
@error = response.message
|
||||
@templates = templates_list
|
||||
|
||||
render 'shared/wikis/edit'
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -57,13 +57,13 @@ module WikiHelper
|
|||
end
|
||||
end
|
||||
|
||||
def wiki_sort_controls(wiki, direction)
|
||||
def wiki_sort_controls(wiki, direction, action: :pages)
|
||||
link_class = 'has-tooltip reverse-sort-btn rspec-reverse-sort'
|
||||
reversed_direction = direction == 'desc' ? 'asc' : 'desc'
|
||||
icon_class = direction == 'desc' ? 'highest' : 'lowest'
|
||||
title = direction == 'desc' ? _('Sort direction: Descending') : _('Sort direction: Ascending')
|
||||
|
||||
link_options = { action: :pages, direction: reversed_direction }
|
||||
link_options = { action: action, direction: reversed_direction }
|
||||
|
||||
render Pajamas::ButtonComponent.new(href: wiki_path(wiki, **link_options), icon: "sort-#{icon_class}", button_options: { class: link_class, title: title })
|
||||
end
|
||||
|
|
@ -137,6 +137,33 @@ module WikiHelper
|
|||
def wiki_page_render_api_endpoint_params(page)
|
||||
{ id: page.container.id, slug: ERB::Util.url_encode(page.slug), params: { version: page.version.id } }
|
||||
end
|
||||
|
||||
def wiki_page_info(page, uploads_path: '')
|
||||
{
|
||||
last_commit_sha: page.last_commit_sha,
|
||||
persisted: page.persisted?,
|
||||
title: page.title,
|
||||
content: page.raw_content || '',
|
||||
format: page.format.to_s,
|
||||
uploads_path: uploads_path,
|
||||
slug: page.slug,
|
||||
path: wiki_page_path(page.wiki, page),
|
||||
wiki_path: wiki_path(page.wiki),
|
||||
help_path: help_page_path('user/project/wiki/index'),
|
||||
markdown_help_path: help_page_path('user/markdown'),
|
||||
markdown_preview_path: wiki_page_path(page.wiki, page, action: :preview_markdown),
|
||||
create_path: wiki_path(page.wiki, action: :create)
|
||||
}
|
||||
end
|
||||
|
||||
def wiki_page_basic_info(page)
|
||||
{
|
||||
title: page.title,
|
||||
format: page.format.to_s,
|
||||
slug: page.slug,
|
||||
path: wiki_page_path(page.wiki, page)
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
WikiHelper.prepend_mod_with('WikiHelper')
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ class ActiveSession
|
|||
ATTR_ACCESSOR_LIST = [
|
||||
:ip_address, :browser, :os,
|
||||
:device_name, :device_type,
|
||||
:is_impersonated, :session_id, :session_private_id
|
||||
:is_impersonated, :session_id, :session_private_id,
|
||||
:admin_mode
|
||||
].freeze
|
||||
ATTR_READER_LIST = [
|
||||
:created_at, :updated_at
|
||||
|
|
@ -77,17 +78,32 @@ class ActiveSession
|
|||
timestamp = Time.current
|
||||
expiry = Settings.gitlab['session_expire_delay'] * 60
|
||||
|
||||
active_user_session = new(
|
||||
ip_address: request.remote_ip,
|
||||
browser: client.name,
|
||||
os: client.os_name,
|
||||
device_name: client.device_name,
|
||||
device_type: client.device_type,
|
||||
created_at: user.current_sign_in_at || timestamp,
|
||||
updated_at: timestamp,
|
||||
session_private_id: session_private_id,
|
||||
is_impersonated: request.session[:impersonator_id].present?
|
||||
)
|
||||
active_user_session = if Feature.enabled?(:show_admin_mode_within_active_sessions)
|
||||
new(
|
||||
ip_address: request.remote_ip,
|
||||
browser: client.name,
|
||||
os: client.os_name,
|
||||
device_name: client.device_name,
|
||||
device_type: client.device_type,
|
||||
created_at: user.current_sign_in_at || timestamp,
|
||||
updated_at: timestamp,
|
||||
session_private_id: session_private_id,
|
||||
is_impersonated: request.session[:impersonator_id].present?,
|
||||
admin_mode: Gitlab::Auth::CurrentUserMode.new(user, request.session).admin_mode?
|
||||
)
|
||||
else
|
||||
new(
|
||||
ip_address: request.remote_ip,
|
||||
browser: client.name,
|
||||
os: client.os_name,
|
||||
device_name: client.device_name,
|
||||
device_type: client.device_type,
|
||||
created_at: user.current_sign_in_at || timestamp,
|
||||
updated_at: timestamp,
|
||||
session_private_id: session_private_id,
|
||||
is_impersonated: request.session[:impersonator_id].present?
|
||||
)
|
||||
end
|
||||
|
||||
Gitlab::Instrumentation::RedisClusterValidator.allow_cross_slot_commands do
|
||||
redis.pipelined do |pipeline|
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ class Wiki
|
|||
|
||||
HOMEPAGE = 'home'
|
||||
SIDEBAR = '_sidebar'
|
||||
TEMPLATES_DIR = 'templates'
|
||||
|
||||
TITLE_ORDER = 'title'
|
||||
CREATED_AT_ORDER = 'created_at'
|
||||
|
|
@ -238,6 +239,9 @@ class Wiki
|
|||
limited = pages.size > limit
|
||||
pages = pages.first(limit) if limited
|
||||
|
||||
# remove page from list if path starts with templates
|
||||
pages.reject! { |page| page.path.start_with?(TEMPLATES_DIR) }
|
||||
|
||||
[WikiDirectory.group_pages(pages), limited]
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class WikiDirectory
|
|||
# @param [Array<WikiPage>] pages
|
||||
# @return [Array<WikiPage, WikiDirectory>]
|
||||
#
|
||||
def group_pages(pages)
|
||||
def group_pages(pages, templates: false)
|
||||
# Build a hash to map paths to created WikiDirectory objects,
|
||||
# and recursively create them for each level of the path.
|
||||
# For the toplevel directory we use '' as path, as that's what WikiPage#directory returns.
|
||||
|
|
@ -39,6 +39,8 @@ class WikiDirectory
|
|||
directories[page.directory].entries << page
|
||||
end
|
||||
|
||||
return directories['templates'].entries if templates
|
||||
|
||||
directories[''].entries
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -172,6 +172,10 @@ class WikiPage
|
|||
last_version&.sha
|
||||
end
|
||||
|
||||
def template?
|
||||
slug.start_with?(Wiki::TEMPLATES_DIR)
|
||||
end
|
||||
|
||||
# Returns boolean True or False if this instance
|
||||
# is an old version of the page.
|
||||
def historical?
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ module Packages
|
|||
app_group, _, app_name = params[:name].rpartition('/')
|
||||
app_group.tr!('/', '.')
|
||||
|
||||
create_package!(:maven,
|
||||
package = create_package!(:maven,
|
||||
maven_metadatum_attributes: {
|
||||
path: params[:path],
|
||||
app_group: app_group,
|
||||
|
|
@ -14,6 +14,10 @@ module Packages
|
|||
app_version: params[:version]
|
||||
}
|
||||
)
|
||||
|
||||
ServiceResponse.success(payload: { package: package })
|
||||
rescue ActiveRecord::RecordInvalid => e
|
||||
ServiceResponse.error(message: e.message, reason: :invalid_parameter)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -49,9 +49,13 @@ module Packages
|
|||
version: version
|
||||
}
|
||||
|
||||
package =
|
||||
service_response =
|
||||
::Packages::Maven::CreatePackageService.new(project, current_user, package_params)
|
||||
.execute
|
||||
|
||||
return service_response if service_response.error?
|
||||
|
||||
package = service_response[:package]
|
||||
end
|
||||
|
||||
package.create_build_infos!(params[:build])
|
||||
|
|
@ -94,7 +98,7 @@ module Packages
|
|||
match_data = file_name.match(Gitlab::Regex::Packages::MAVEN_SNAPSHOT_DYNAMIC_PARTS)
|
||||
|
||||
if match_data
|
||||
file_name.gsub(match_data.captures.last, "")
|
||||
file_name.gsub(match_data.captures.last, '')
|
||||
else
|
||||
file_name
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Packages
|
||||
module Npm
|
||||
class CreatePackageService < ::Packages::CreatePackageService
|
||||
|
|
@ -52,7 +53,8 @@ module Packages
|
|||
def create_npm_metadatum!(package)
|
||||
package.create_npm_metadatum!(package_json: package_json)
|
||||
rescue ActiveRecord::RecordInvalid => e
|
||||
if package.npm_metadatum && package.npm_metadatum.errors.where(:package_json, :too_large).any? # rubocop: disable CodeReuse/ActiveRecord
|
||||
|
||||
if package.npm_metadatum && package.npm_metadatum.errors.added?(:package_json, :too_large)
|
||||
Gitlab::ErrorTracking.track_exception(e, field_sizes: field_sizes_for_error_tracking)
|
||||
end
|
||||
|
||||
|
|
@ -72,7 +74,8 @@ module Packages
|
|||
return false if Feature.disabled?(:packages_protected_packages, project)
|
||||
|
||||
user_project_authorization_access_level = current_user.max_member_access_for_project(project.id)
|
||||
project.package_protection_rules.for_push_exists?(access_level: user_project_authorization_access_level, package_name: name, package_type: :npm)
|
||||
project.package_protection_rules.for_push_exists?(access_level: user_project_authorization_access_level,
|
||||
package_name: name, package_type: :npm)
|
||||
end
|
||||
|
||||
def name
|
||||
|
|
@ -110,7 +113,8 @@ module Packages
|
|||
def calculated_package_file_size
|
||||
# This calculation is based on:
|
||||
# 1. 4 chars in a Base64 encoded string are 3 bytes in the original string. Meaning 1 char is 0.75 bytes.
|
||||
# 2. The encoded string may have 1 or 2 extra '=' chars used for padding. Each padding char means 1 byte less in the original string.
|
||||
# 2. The encoded string may have 1 or 2 extra '=' chars used for padding. Each padding char means 1 byte less in
|
||||
# the original string.
|
||||
# Reference:
|
||||
# - https://blog.aaronlenoir.com/2017/11/10/get-original-length-from-base-64-string/
|
||||
# - https://en.wikipedia.org/wiki/Base64#Decoding_Base64_with_padding
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ module WikiPages
|
|||
execute_hooks(page)
|
||||
ServiceResponse.success(payload: { page: page })
|
||||
else
|
||||
ServiceResponse.error(message: _('Could not create wiki page'), payload: { page: page })
|
||||
message = page.template? ? _('Could not create wiki template') : _('Could not create wiki page')
|
||||
ServiceResponse.error(message: message, payload: { page: page })
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,9 +7,8 @@ module WikiPages
|
|||
execute_hooks(page)
|
||||
ServiceResponse.success(payload: { page: page })
|
||||
else
|
||||
ServiceResponse.error(
|
||||
message: _('Could not delete wiki page'), payload: { page: page }
|
||||
)
|
||||
message = page.template? ? _('Could not delete wiki template') : _('Could not delete wiki page')
|
||||
ServiceResponse.error(message: message, payload: { page: page })
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ module WikiPages
|
|||
execute_hooks(page)
|
||||
ServiceResponse.success(payload: { page: page })
|
||||
else
|
||||
raise UpdateError, _('Could not update wiki page')
|
||||
message = page.template? ? _('Could not update wiki template') : _('Could not update wiki page')
|
||||
raise UpdateError, message
|
||||
end
|
||||
rescue UpdateError, WikiPage::PageChangedError, WikiPage::PageRenameError => e
|
||||
page.update_attributes(@params) # rubocop:disable Rails/ActiveRecordAliases
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
"downstream_pipeline_trigger_limit_per_project_user_sha": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "Maximum number of downstream pipelines triggered in a project per user"
|
||||
"description": "Maximum number of downstream pipelines that can be triggered per minute (for a given project, user, and commit)."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,10 +51,10 @@
|
|||
.form-text.text-muted
|
||||
= s_('AdminSettings|The maximum number of included files per pipeline.')
|
||||
.form-group
|
||||
= f.label :downstream_pipeline_trigger_limit_per_project_user_sha, s_('AdminSettings|Maximum downstream pipelines triggered in a project per user'), class: 'label-bold'
|
||||
= f.label :downstream_pipeline_trigger_limit_per_project_user_sha, s_('AdminSettings|Maximum downstream pipeline trigger rate'), class: 'label-bold'
|
||||
= f.number_field :downstream_pipeline_trigger_limit_per_project_user_sha, min: 0, class: 'form-control gl-form-input'
|
||||
.form-text.text-muted
|
||||
= s_('AdminSettings|The maximum number of downstream pipelines triggered in a project per user.')
|
||||
= s_('AdminSettings|The maximum number of downstream pipelines that can be triggered per minute (for a given project, user, and commit).')
|
||||
.form-group
|
||||
= f.label :ci_config_path, _('Default CI/CD configuration file'), class: 'label-bold'
|
||||
= f.text_field :default_ci_config_path, class: 'form-control gl-form-input', placeholder: '.gitlab-ci.yml'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
- page_info = { last_commit_sha: @page.last_commit_sha, persisted: @page.persisted?, title: @page.title, content: @page.raw_content || '', format: @page.format.to_s, uploads_path: uploads_path, path: wiki_page_path(@wiki, @page), wiki_path: wiki_path(@wiki), help_path: help_page_path('user/project/wiki/index'), markdown_help_path: help_page_path('user/markdown'), markdown_preview_path: wiki_page_path(@wiki, @page, action: :preview_markdown), create_path: wiki_path(@wiki, action: :create) }
|
||||
|
||||
.gl-mt-3
|
||||
= form_errors(@page, truncate: :title)
|
||||
|
||||
#js-wiki-form{ data: { page_info: page_info.to_json, format_options: wiki_markup_hash_by_name_id.to_json } }
|
||||
- templates = @templates.map { |t| wiki_page_basic_info(t) }
|
||||
|
||||
#js-wiki-form{ data: { page_info: wiki_page_info(@page, uploads_path: uploads_path).to_json, templates: templates.to_json, format_options: wiki_markup_hash_by_name_id.to_json } }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
- if @page&.persisted?
|
||||
- if can?(current_user, :create_wiki, @wiki.container)
|
||||
= link_button_to wiki_path(@wiki, action: :new), role: "button", data: { testid: 'new-page-button' }, variant: :confirm, category: :secondary do
|
||||
= s_("Wiki|New page")
|
||||
- if @page.template?
|
||||
= link_button_to wiki_page_path(@wiki, "#{Wiki::TEMPLATES_DIR}/#{SecureRandom.uuid}", random_title: true), icon: 'plus' do
|
||||
= s_("Wiki|New template")
|
||||
- else
|
||||
= link_button_to wiki_path(@wiki, action: :new), role: "button", data: { testid: 'new-page-button' }, variant: :confirm, category: :secondary do
|
||||
= s_("Wiki|New page")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
%li
|
||||
= link_to wiki_page.human_title, wiki_page_path(@wiki, wiki_page), data: { testid: 'wiki-page-link', qa_page_name: wiki_page.slug }
|
||||
%small (#{wiki_page.format})
|
||||
.gl-float-right
|
||||
%li{ class: 'gl-display-flex!' }
|
||||
%div
|
||||
= link_to wiki_page.human_title, wiki_page_path(@wiki, wiki_page), data: { testid: 'wiki-page-link', qa_page_name: wiki_page.slug }
|
||||
%small.gl-pr-2 (#{wiki_page.format})
|
||||
- if can?(current_user, :create_wiki, @wiki) && wiki_page.template?
|
||||
= render Pajamas::ButtonComponent.new(category: :secondary, icon: 'pencil', href: wiki_page_path(@wiki, wiki_page, action: :edit), button_options: { title: s_('Edit template') })
|
||||
.gl-flex-grow-1.gl-text-right
|
||||
- if wiki_page.last_version
|
||||
%small= (s_("Last edited %{date}") % { date: time_ago_with_tooltip(wiki_page.last_version.authored_date) }).html_safe
|
||||
%small
|
||||
= (s_("Last edited %{date}") % { date: time_ago_with_tooltip(wiki_page.last_version.authored_date) }).html_safe
|
||||
|
||||
|
|
|
|||
|
|
@ -6,16 +6,22 @@
|
|||
%a.gutter-toggle.gl-float-right.d-block.d-md-none.js-sidebar-wiki-toggle{ href: "#" }
|
||||
= sprite_icon('chevron-double-lg-right', css_class: 'gl-icon')
|
||||
|
||||
.gl-display-flex.gl-flex-wrap
|
||||
.gl-display-flex.gl-flex-direction-column.gl-gap-3
|
||||
- git_access_url = wiki_path(@wiki, action: :git_access)
|
||||
= link_to git_access_url, class: 'gl-mr-5' + (active_nav_link?(path: 'wikis#git_access') ? ' active' : ''), data: { testid: 'clone-repository-link' } do
|
||||
= link_to git_access_url, class: (active_nav_link?(path: 'wikis#git_access') ? ' active' : ''), data: { testid: 'clone-repository-link' } do
|
||||
= sprite_icon('download', css_class: 'gl-mr-2')
|
||||
%span= _("Clone repository")
|
||||
|
||||
- templates_url = wiki_page_path(@wiki, Wiki::TEMPLATES_DIR)
|
||||
- templates_link_class = (@page&.slug == Wiki::TEMPLATES_DIR) ? 'active' : ''
|
||||
= link_to templates_url, class: templates_link_class do
|
||||
= sprite_icon('template', css_class: 'gl-mr-2')
|
||||
%span= _("Templates")
|
||||
|
||||
- if can?(current_user, :create_wiki, @wiki)
|
||||
- edit_sidebar_url = wiki_page_path(@wiki, Wiki::SIDEBAR, action: :edit)
|
||||
- link_class = (editing && @page&.slug == Wiki::SIDEBAR) ? 'active' : ''
|
||||
= link_to edit_sidebar_url, class: link_class do
|
||||
- sidebar_link_class = (editing && @page&.slug == Wiki::SIDEBAR) ? 'active' : ''
|
||||
= link_to edit_sidebar_url, class: sidebar_link_class do
|
||||
= sprite_icon('pencil', css_class: 'gl-mr-2')
|
||||
%span= _("Edit sidebar")
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
.nav-controls.pb-md-3.pb-lg-0
|
||||
= link_button_to wiki_page_path(@wiki, @page, action: :history), role: 'button', data: { testid: 'page-history-button' } do
|
||||
= s_('Wiki|Page history')
|
||||
= @page.template? ? s_('Wiki|Template history') : s_('Wiki|Page history')
|
||||
|
||||
.page-content-header
|
||||
.header-main-content
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
- breadcrumb_title(s_("Wiki|New Page")) unless @page.persisted?
|
||||
- breadcrumb_title(@page.template? ? s_("Wiki|New Template") : s_("Wiki|New Page")) unless @page.persisted?
|
||||
- wiki_page_title @page, @page.persisted? ? _('Edit') : _('New')
|
||||
- add_page_specific_style 'page_bundles/wiki'
|
||||
- @gfm_form = true
|
||||
|
|
@ -15,9 +15,9 @@
|
|||
= link_to_wiki_page @page
|
||||
%span.gl-text-secondary
|
||||
·
|
||||
= s_("Wiki|Edit Page")
|
||||
= @page.template? ? s_("Wiki|Edit Template") : s_("Wiki|Edit Page")
|
||||
- else
|
||||
= s_("Wiki|New Page")
|
||||
= @page.template? ? s_("Wiki|New Template") : s_("Wiki|New Page")
|
||||
|
||||
.nav-controls.pb-md-3.pb-lg-0
|
||||
- if @page.persisted?
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
%table.table.wiki-history
|
||||
%thead
|
||||
%tr
|
||||
%th= s_('Wiki|Page version')
|
||||
%th= @page.template? ? s_('Wiki|Template version') : s_('Wiki|Page version')
|
||||
%th= _('Author')
|
||||
%th= _('Changes')
|
||||
%th= _('Last updated')
|
||||
|
|
|
|||
|
|
@ -19,4 +19,4 @@
|
|||
- @wiki_entries.each do |entry|
|
||||
= render partial: entry.to_partial_path, object: entry, locals: { context: 'pages' }
|
||||
|
||||
= paginate @wiki_pages, theme: 'gitlab'
|
||||
= paginate @pages_list, theme: 'gitlab'
|
||||
|
|
|
|||
|
|
@ -13,14 +13,14 @@
|
|||
|
||||
.nav-controls.pb-md-3.pb-lg-0
|
||||
- if can?(current_user, :create_wiki, @wiki.container) && @page.latest? && @valid_encoding
|
||||
- edit_action_description = _('Edit page')
|
||||
- edit_action_description = @page.template? ? _('Edit template') : _('Edit page')
|
||||
- edit_action_shortcut = 'e'
|
||||
- edit_button_title = "#{edit_action_description} <kbd class='flat ml-1' aria-hidden=true>#{edit_action_shortcut}</kbd>"
|
||||
= render Pajamas::ButtonComponent.new(href: wiki_page_path(@wiki, @page, action: :edit), button_options: { aria: {label: edit_action_description, keyshortcuts: edit_action_shortcut}, class: 'has-tooltip js-wiki-edit', data: { html: 'true', testid: 'wiki-edit-button' }, title: edit_button_title }) do
|
||||
= _('Edit')
|
||||
= render 'shared/wikis/main_links'
|
||||
|
||||
#js-export-actions{ data: { options: { history: page_history, print: { target: '.js-wiki-page-content', title: @page.human_title, stylesheet: [stylesheet_path('application')] } }.to_json } }
|
||||
#js-export-actions{ data: { options: { is_template: @page.template?, history: page_history, print: { target: '.js-wiki-page-content', title: @page.human_title, stylesheet: [stylesheet_path('application')] } }.to_json } }
|
||||
|
||||
- if @page.historical?
|
||||
= render Pajamas::AlertComponent.new(variant: :warning,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
- add_to_breadcrumbs _('Wiki'), wiki_path(@wiki)
|
||||
- breadcrumb_title s_("Wiki|Templates")
|
||||
- page_title s_("Wiki|Templates"), _("Wiki")
|
||||
- add_page_specific_style 'page_bundles/wiki'
|
||||
|
||||
.wiki-page-header.top-area.flex-column.flex-lg-row
|
||||
%h1.page-title.gl-font-size-h-display.gl-flex-grow-1
|
||||
= s_("Wiki|Wiki Templates")
|
||||
|
||||
.nav-controls.pb-md-3.pb-lg-0
|
||||
= link_button_to wiki_page_path(@wiki, "#{Wiki::TEMPLATES_DIR}/#{SecureRandom.uuid}", random_title: true), icon: 'plus' do
|
||||
= s_("Wiki|New template")
|
||||
|
||||
.dropdown.inline.wiki-sort-dropdown
|
||||
.btn-group{ role: 'group' }
|
||||
= wiki_sort_controls(@wiki, params[:direction], action: :templates)
|
||||
|
||||
%ul.wiki-pages-list.content-list
|
||||
- if @templates_list.empty?
|
||||
%li.no-wiki-pages
|
||||
= s_("Wiki|No templates found")
|
||||
- @wiki_entries.each do |entry|
|
||||
= render partial: entry.to_partial_path, object: entry, locals: { context: 'pages' }
|
||||
|
||||
= paginate @templates_list, theme: 'gitlab'
|
||||
|
|
@ -24,6 +24,8 @@
|
|||
%strong= _('Signed in')
|
||||
= s_('ProfileSession|on')
|
||||
= l(active_session.created_at, format: :short)
|
||||
- if active_session.try(:admin_mode)
|
||||
%strong= _('with Admin Mode')
|
||||
|
||||
- unless is_current_session
|
||||
.gl-float-right
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
name: show_admin_mode_within_active_sessions
|
||||
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/438674
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/145523
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/444188
|
||||
milestone: '16.10'
|
||||
group: group::anti-abuse
|
||||
type: gitlab_com_derisk
|
||||
default_enabled: false
|
||||
|
|
@ -4,6 +4,7 @@ scope(controller: :wikis) do
|
|||
scope(path: 'wikis', as: :wikis) do
|
||||
get :git_access
|
||||
get :pages
|
||||
get :templates
|
||||
get :new
|
||||
get '/', to: redirect { |params, request| "#{request.path}/home" }
|
||||
post '/', to: 'wikis#create'
|
||||
|
|
@ -16,6 +17,7 @@ scope(controller: :wikis) do
|
|||
get :edit
|
||||
get :history
|
||||
get :diff
|
||||
get :raw
|
||||
post :preview_markdown
|
||||
get '/', action: :show
|
||||
put '/', action: :update
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@ class Gitlab::Seeder::Packages
|
|||
path: "#{name}/#{version}"
|
||||
}
|
||||
|
||||
pkg = ::Packages::Maven::CreatePackageService.new(project, project.creator, params).execute
|
||||
service_response = ::Packages::Maven::CreatePackageService.new(project, project.creator, params).execute
|
||||
pkg = service_response[:package]
|
||||
|
||||
%w(maven-metadata.xml my-app-1.0-20180724.124855-1.pom my-app-1.0-20180724.124855-1.jar).each do |filename|
|
||||
with_cloned_fixture_file('maven', filename) do |filepath|
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ For more information, see the links shown on this page for each external provide
|
|||
| **Provider-to-GitLab Role Sync** | SAML Group Sync | LDAP Group Sync<br>SAML Group Sync ([GitLab 15.1](https://gitlab.com/gitlab-org/gitlab/-/issues/285150) and later) |
|
||||
| **User Removal** | SCIM (remove user from top-level group) | LDAP (remove user from groups and block from the instance)<br>SCIM |
|
||||
|
||||
**Footnotes:**
|
||||
|
||||
1. Using Just-In-Time (JIT) provisioning, user accounts are created when the user first signs in.
|
||||
|
||||
## Test OIDC/OAuth in GitLab
|
||||
|
|
|
|||
|
|
@ -123,11 +123,13 @@ To enable the agent server on multiple nodes:
|
|||
| `gitlab_kas['api_secret_key']` | The shared secret used for authentication between KAS and GitLab. The value must be Base64-encoded and exactly 32 bytes long. |
|
||||
| `gitlab_kas['private_api_secret_key']` | The shared secret used for authentication between different KAS instances. The value must be Base64-encoded and exactly 32 bytes long. |
|
||||
| `OWN_PRIVATE_API_URL` | The environment variable used by KAS for service discovery. Set to the hostname or IP address of the node you're configuring. The node must be reachable by other nodes in the cluster. |
|
||||
| `gitlab_kas_external_url` | The user-facing URL for the in-cluster `agentk`. Can be a fully qualified domain or subdomain, <sup>**1**</sup> or a GitLab external URL. <sup>**2**</sup> If blank, defaults to a GitLab external URL. |
|
||||
| `gitlab_kas_external_url` | The user-facing URL for the in-cluster `agentk`. Can be a fully qualified domain or subdomain, <sup>1</sup> or a GitLab external URL. <sup>2</sup> If blank, defaults to a GitLab external URL. |
|
||||
| `gitlab_rails['gitlab_kas_external_url']` | The user-facing URL for the in-cluster `agentk`. If blank, defaults to the `gitlab_kas_external_url`. |
|
||||
| `gitlab_rails['gitlab_kas_external_k8s_proxy_url']` | The user-facing URL for Kubernetes API proxying. If blank, defaults to a URL based on `gitlab_kas_external_url`. |
|
||||
| `gitlab_rails['gitlab_kas_internal_url']` | The internal URL the GitLab backend uses to communicate with KAS. |
|
||||
|
||||
**Footnotes:**
|
||||
|
||||
1. For example, `wss://kas.gitlab.example.com/`.
|
||||
1. For example, `wss://gitlab.example.com/-/kubernetes-agent/`.
|
||||
|
||||
|
|
|
|||
|
|
@ -28,35 +28,34 @@ specifically the [Before you start](index.md#before-you-start) and [Deciding whi
|
|||
|
||||
| Service | Nodes | Configuration | GCP | AWS | Azure |
|
||||
|------------------------------------------|-------|-------------------------|------------------|----------------|-----------|
|
||||
| External load balancing node<sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Consul<sup>1</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| PostgreSQL<sup>1</sup> | 3 | 8 vCPU, 30 GB memory | `n1-standard-8` | `m5.2xlarge` | `D8s v3` |
|
||||
| PgBouncer<sup>1</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Internal load balancing node<sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Redis/Sentinel - Cache<sup>2</sup> | 3 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` | `D4s v3` |
|
||||
| Redis/Sentinel - Persistent<sup>2</sup> | 3 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` | `D4s v3` |
|
||||
| Gitaly<sup>5</sup> | 3 | 16 vCPU, 60 GB memory<sup>6</sup> | `n1-standard-16` | `m5.4xlarge` | `D16s v3` |
|
||||
| Praefect<sup>5</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Praefect PostgreSQL<sup>1</sup> | 1+ | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Sidekiq<sup>7</sup> | 4 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` | `D4s v3` |
|
||||
| GitLab Rails<sup>7</sup> | 3 | 32 vCPU, 28.8 GB memory | `n1-highcpu-32` | `c5.9xlarge` | `F32s v2` |
|
||||
| External load balancing node <sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Consul <sup>1</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| PostgreSQL <sup>1</sup> | 3 | 8 vCPU, 30 GB memory | `n1-standard-8` | `m5.2xlarge` | `D8s v3` |
|
||||
| PgBouncer <sup>1</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Internal load balancing node <sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Redis/Sentinel - Cache <sup>2</sup> | 3 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` | `D4s v3` |
|
||||
| Redis/Sentinel - Persistent <sup>2</sup> | 3 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` | `D4s v3` |
|
||||
| Gitaly <sup>5</sup> | 3 | 16 vCPU, 60 GB memory <sup>6</sup> | `n1-standard-16` | `m5.4xlarge` | `D16s v3` |
|
||||
| Praefect <sup>5</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Praefect PostgreSQL <sup>1</sup> | 1+ | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Sidekiq <sup>7</sup> | 4 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` | `D4s v3` |
|
||||
| GitLab Rails <sup>7</sup> | 3 | 32 vCPU, 28.8 GB memory | `n1-highcpu-32` | `c5.9xlarge` | `F32s v2` |
|
||||
| Monitoring node | 1 | 4 vCPU, 3.6 GB memory | `n1-highcpu-4` | `c5.xlarge` | `F4s v2` |
|
||||
| Object storage<sup>4</sup> | - | - | - | - | - |
|
||||
| Object storage <sup>4</sup> | - | - | - | - | - |
|
||||
|
||||
**Footnotes:**
|
||||
|
||||
<!-- Disable ordered list rule https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md029---ordered-list-item-prefix -->
|
||||
<!-- markdownlint-disable MD029 -->
|
||||
1. Can be optionally run on reputable third-party external PaaS PostgreSQL solutions. See [Provide your own PostgreSQL instance](#provide-your-own-postgresql-instance) and [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
2. Can be optionally run on reputable third-party external PaaS Redis solutions. See [Provide your own Redis instances](#provide-your-own-redis-instances) and [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
1. Can be optionally run on reputable third-party external PaaS Redis solutions. See [Provide your own Redis instances](#provide-your-own-redis-instances) and [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
- Redis is primarily single threaded and doesn't significantly benefit from an increase in CPU cores. For this size of architecture it's strongly recommended having separate Cache and Persistent instances as specified to achieve optimum performance.
|
||||
3. Can be optionally run on reputable third-party load balancing services (LB PaaS). See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
4. Should be run on reputable Cloud Provider or Self Managed solutions. See [Configure the object storage](#configure-the-object-storage) for more information.
|
||||
5. Gitaly Cluster provides the benefits of fault tolerance, but comes with additional complexity of setup and management.
|
||||
1. Can be optionally run on reputable third-party load balancing services (LB PaaS). See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
1. Should be run on reputable Cloud Provider or Self Managed solutions. See [Configure the object storage](#configure-the-object-storage) for more information.
|
||||
1. Gitaly Cluster provides the benefits of fault tolerance, but comes with additional complexity of setup and management.
|
||||
Review the existing [technical limitations and considerations before deploying Gitaly Cluster](../gitaly/index.md#before-deploying-gitaly-cluster). If you want sharded Gitaly, use the same specs listed above for `Gitaly`.
|
||||
6. Gitaly specifications are based on high percentiles of both usage patterns and repository sizes in good health.
|
||||
1. Gitaly specifications are based on high percentiles of both usage patterns and repository sizes in good health.
|
||||
However, if you have [large monorepos](index.md#large-monorepos) (larger than several gigabytes) or [additional workloads](index.md#additional-workloads) these can *significantly* impact Git and Gitaly performance and further adjustments will likely be required.
|
||||
7. Can be placed in Auto Scaling Groups (ASGs) as the component doesn't store any [stateful data](index.md#autoscaling-of-stateful-nodes).
|
||||
1. Can be placed in Auto Scaling Groups (ASGs) as the component doesn't store any [stateful data](index.md#autoscaling-of-stateful-nodes).
|
||||
However, for GitLab Rails certain processes like [migrations](#gitlab-rails-post-configuration) and [Mailroom](../incoming_email.md) should be run on only one node.
|
||||
<!-- markdownlint-enable MD029 -->
|
||||
|
||||
NOTE:
|
||||
For all PaaS solutions that involve configuring instances, it is strongly recommended to implement a minimum of three nodes in three different availability zones to align with resilient cloud architecture practices.
|
||||
|
|
@ -2294,29 +2293,28 @@ services where applicable):
|
|||
|
||||
| Service | Nodes | Configuration | GCP | AWS |
|
||||
|------------------------------------------|-------|-----------------------|------------------|--------------|
|
||||
| Consul<sup>1</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| PostgreSQL<sup>1</sup> | 3 | 8 vCPU, 30 GB memory | `n1-standard-8` | `m5.2xlarge` |
|
||||
| PgBouncer<sup>1</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Internal load balancing node<sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Redis/Sentinel - Cache<sup>2</sup> | 3 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` |
|
||||
| Redis/Sentinel - Persistent<sup>2</sup> | 3 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` |
|
||||
| Gitaly<sup>5</sup> | 3 | 16 vCPU, 60 GB memory<sup>6</sup> | `n1-standard-16` | `m5.4xlarge` |
|
||||
| Praefect<sup>5</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Praefect PostgreSQL<sup>1</sup> | 1+ | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Object storage<sup>4</sup> | - | - | - | - |
|
||||
| Consul <sup>1</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| PostgreSQL <sup>1</sup> | 3 | 8 vCPU, 30 GB memory | `n1-standard-8` | `m5.2xlarge` |
|
||||
| PgBouncer <sup>1</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Internal load balancing node <sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Redis/Sentinel - Cache <sup>2</sup> | 3 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` |
|
||||
| Redis/Sentinel - Persistent <sup>2</sup> | 3 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` |
|
||||
| Gitaly <sup>5</sup> | 3 | 16 vCPU, 60 GB memory <sup>6</sup> | `n1-standard-16` | `m5.4xlarge` |
|
||||
| Praefect <sup>5</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Praefect PostgreSQL <sup>1</sup> | 1+ | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Object storage <sup>4</sup> | - | - | - | - |
|
||||
|
||||
**Footnotes:**
|
||||
|
||||
<!-- Disable ordered list rule https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md029---ordered-list-item-prefix -->
|
||||
<!-- markdownlint-disable MD029 -->
|
||||
1. Can be optionally run on reputable third-party external PaaS PostgreSQL solutions. See [Provide your own PostgreSQL instance](#provide-your-own-postgresql-instance) and [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
2. Can be optionally run on reputable third-party external PaaS Redis solutions. See [Provide your own Redis instances](#provide-your-own-redis-instances) and [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
1. Can be optionally run on reputable third-party external PaaS Redis solutions. See [Provide your own Redis instances](#provide-your-own-redis-instances) and [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
- Redis is primarily single threaded and doesn't significantly benefit from an increase in CPU cores. For this size of architecture it's strongly recommended having separate Cache and Persistent instances as specified to achieve optimum performance.
|
||||
3. Can be optionally run on reputable third-party load balancing services (LB PaaS). See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
4. Should be run on reputable Cloud Provider or Self Managed solutions. See [Configure the object storage](#configure-the-object-storage) for more information.
|
||||
5. Gitaly Cluster provides the benefits of fault tolerance, but comes with additional complexity of setup and management.
|
||||
1. Can be optionally run on reputable third-party load balancing services (LB PaaS). See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
1. Should be run on reputable Cloud Provider or Self Managed solutions. See [Configure the object storage](#configure-the-object-storage) for more information.
|
||||
1. Gitaly Cluster provides the benefits of fault tolerance, but comes with additional complexity of setup and management.
|
||||
Review the existing [technical limitations and considerations before deploying Gitaly Cluster](../gitaly/index.md#before-deploying-gitaly-cluster). If you want sharded Gitaly, use the same specs listed above for `Gitaly`.
|
||||
6. Gitaly specifications are based on high percentiles of both usage patterns and repository sizes in good health.
|
||||
1. Gitaly specifications are based on high percentiles of both usage patterns and repository sizes in good health.
|
||||
However, if you have [large monorepos](index.md#large-monorepos) (larger than several gigabytes) or [additional workloads](index.md#additional-workloads) these can *significantly* impact Git and Gitaly performance and further adjustments will likely be required.
|
||||
<!-- markdownlint-enable MD029 -->
|
||||
|
||||
NOTE:
|
||||
For all PaaS solutions that involve configuring instances, it is strongly recommended to implement a minimum of three nodes in three different availability zones to align with resilient cloud architecture practices.
|
||||
|
|
|
|||
|
|
@ -25,26 +25,26 @@ For a full list of reference architectures, see
|
|||
|
||||
| Service | Nodes | Configuration | GCP | AWS | Azure |
|
||||
|----------------------------|-------|------------------------|-----------------|--------------|----------|
|
||||
| Load balancer<sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| PostgreSQL<sup>1</sup> | 1 | 2 vCPU, 7.5 GB memory | `n1-standard-2` | `m5.large` | `D2s v3` |
|
||||
| Redis<sup>2</sup> | 1 | 1 vCPU, 3.75 GB memory | `n1-standard-1` | `m5.large` | `D2s v3` |
|
||||
| Gitaly<sup>5</sup> | 1 | 4 vCPU, 15 GB memory<sup>5</sup> | `n1-standard-4` | `m5.xlarge` | `D4s v3` |
|
||||
| Sidekiq<sup>6</sup> | 1 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` | `D4s v3` |
|
||||
| GitLab Rails<sup>6</sup> | 2 | 8 vCPU, 7.2 GB memory | `n1-highcpu-8` | `c5.2xlarge` | `F8s v2` |
|
||||
| Monitoring node | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Object storage<sup>4</sup> | - | - | - | - | - |
|
||||
| Load balancer <sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| PostgreSQL <sup>1</sup> | 1 | 2 vCPU, 7.5 GB memory | `n1-standard-2` | `m5.large` | `D2s v3` |
|
||||
| Redis <sup>2</sup> | 1 | 1 vCPU, 3.75 GB memory | `n1-standard-1` | `m5.large` | `D2s v3` |
|
||||
| Gitaly <sup>5</sup> | 1 | 4 vCPU, 15 GB memory <sup>5</sup> | `n1-standard-4` | `m5.xlarge` | `D4s v3` |
|
||||
| Sidekiq <sup>6</sup> | 1 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` | `D4s v3` |
|
||||
| GitLab Rails <sup>6</sup> | 2 | 8 vCPU, 7.2 GB memory | `n1-highcpu-8` | `c5.2xlarge` | `F8s v2` |
|
||||
| Monitoring node | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Object storage <sup>4</sup> | - | - | - | - | - |
|
||||
|
||||
**Footnotes:**
|
||||
|
||||
<!-- markdownlint-disable MD029 -->
|
||||
1. Can be optionally run on reputable third-party external PaaS PostgreSQL solutions. See [Provide your own PostgreSQL instance](#provide-your-own-postgresql-instance) and [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
2. Can be optionally run on reputable third-party external PaaS Redis solutions. See [Provide your own Redis instance](#provide-your-own-redis-instance) and [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
3. Can be optionally run on reputable third-party load balancing services (LB PaaS). See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
4. Should be run on reputable Cloud Provider or Self Managed solutions. See [Configure the object storage](#configure-the-object-storage) for more information.
|
||||
5. Gitaly specifications are based on the use of normal-sized repositories in good health.
|
||||
1. Can be optionally run on reputable third-party external PaaS Redis solutions. See [Provide your own Redis instance](#provide-your-own-redis-instance) and [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
1. Can be optionally run on reputable third-party load balancing services (LB PaaS). See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
1. Should be run on reputable Cloud Provider or Self Managed solutions. See [Configure the object storage](#configure-the-object-storage) for more information.
|
||||
1. Gitaly specifications are based on the use of normal-sized repositories in good health.
|
||||
However, if you have large monorepos (larger than several gigabytes) this can **significantly** impact Git and Gitaly performance and an increase of specifications will likely be required.
|
||||
Refer to [large monorepos](index.md#large-monorepos) for more information.
|
||||
6. Can be placed in Auto Scaling Groups (ASGs) as the component doesn't store any [stateful data](index.md#autoscaling-of-stateful-nodes).
|
||||
1. Can be placed in Auto Scaling Groups (ASGs) as the component doesn't store any [stateful data](index.md#autoscaling-of-stateful-nodes).
|
||||
However, for GitLab Rails certain processes like [migrations](#gitlab-rails-post-configuration) and [Mailroom](../incoming_email.md) should be run on only one node.
|
||||
<!-- markdownlint-enable MD029 -->
|
||||
|
||||
NOTE:
|
||||
For all PaaS solutions that involve configuring instances, it's recommended to deploy them over multiple availability zones for resilience if desired.
|
||||
|
|
@ -1137,19 +1137,18 @@ the overall makeup as desired as long as the minimum CPU and Memory requirements
|
|||
Next are the backend components that run on static compute VMs using the Linux package (or External PaaS
|
||||
services where applicable):
|
||||
|
||||
| Service | Nodes | Configuration | GCP | AWS |
|
||||
|----------------------------|-------|------------------------|-----------------|-------------|
|
||||
| PostgreSQL<sup>1</sup> | 1 | 2 vCPU, 7.5 GB memory | `n1-standard-2` | `m5.large` |
|
||||
| Redis<sup>2</sup> | 1 | 1 vCPU, 3.75 GB memory | `n1-standard-1` | `m5.large` |
|
||||
| Gitaly | 1 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` |
|
||||
| Object storage<sup>3</sup> | - | - | - | - |
|
||||
| Service | Nodes | Configuration | GCP | AWS |
|
||||
|-----------------------------|-------|------------------------|-----------------|-------------|
|
||||
| PostgreSQL <sup>1</sup> | 1 | 2 vCPU, 7.5 GB memory | `n1-standard-2` | `m5.large` |
|
||||
| Redis <sup>2</sup> | 1 | 1 vCPU, 3.75 GB memory | `n1-standard-1` | `m5.large` |
|
||||
| Gitaly | 1 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` |
|
||||
| Object storage <sup>3</sup> | - | - | - | - |
|
||||
|
||||
**Footnotes:**
|
||||
|
||||
<!-- Disable ordered list rule https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md029---ordered-list-item-prefix -->
|
||||
<!-- markdownlint-disable MD029 -->
|
||||
1. Can be optionally run on reputable third-party external PaaS PostgreSQL solutions. See [Provide your own PostgreSQL instance](#provide-your-own-postgresql-instance) and [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
2. Can be optionally run on reputable third-party external PaaS Redis solutions. See [Provide your own Redis instance](#provide-your-own-redis-instance) and [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
3. Should be run on reputable Cloud Provider or Self Managed solutions. See [Configure the object storage](#configure-the-object-storage) for more information.
|
||||
<!-- markdownlint-enable MD029 -->
|
||||
1. Can be optionally run on reputable third-party external PaaS Redis solutions. See [Provide your own Redis instance](#provide-your-own-redis-instance) and [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
1. Should be run on reputable Cloud Provider or Self Managed solutions. See [Configure the object storage](#configure-the-object-storage) for more information.
|
||||
|
||||
NOTE:
|
||||
For all PaaS solutions that involve configuring instances, it is strongly recommended to implement a minimum of three nodes in three different availability zones to align with resilient cloud architecture practices.
|
||||
|
|
|
|||
|
|
@ -28,33 +28,32 @@ For a full list of reference architectures, see
|
|||
|
||||
| Service | Nodes | Configuration | GCP | AWS | Azure |
|
||||
|-------------------------------------------|-------|-----------------------|-----------------|--------------|----------|
|
||||
| External load balancing node<sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Redis<sup>2</sup> | 3 | 2 vCPU, 7.5 GB memory | `n1-standard-2` | `m5.large` | `D2s v3` |
|
||||
| Consul<sup>1</sup> + Sentinel<sup>2</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| PostgreSQL<sup>1</sup> | 3 | 2 vCPU, 7.5 GB memory | `n1-standard-2` | `m5.large` | `D2s v3` |
|
||||
| PgBouncer<sup>1</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Internal load balancing node<sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Gitaly<sup>5</sup> | 3 | 4 vCPU, 15 GB memory<sup>6</sup> | `n1-standard-4` | `m5.xlarge` | `D4s v3` |
|
||||
| Praefect<sup>5</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Praefect PostgreSQL<sup>1</sup> | 1+ | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Sidekiq<sup>7</sup> | 2 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` | `D2s v3` |
|
||||
| GitLab Rails<sup>7</sup> | 3 | 8 vCPU, 7.2 GB memory | `n1-highcpu-8` | `c5.2xlarge` | `F8s v2` |
|
||||
| External load balancing node <sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Redis <sup>2</sup> | 3 | 2 vCPU, 7.5 GB memory | `n1-standard-2` | `m5.large` | `D2s v3` |
|
||||
| Consul <sup>1</sup> + Sentinel <sup>2</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| PostgreSQL <sup>1</sup> | 3 | 2 vCPU, 7.5 GB memory | `n1-standard-2` | `m5.large` | `D2s v3` |
|
||||
| PgBouncer <sup>1</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Internal load balancing node <sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Gitaly <sup>5</sup> | 3 | 4 vCPU, 15 GB memory <sup>6</sup> | `n1-standard-4` | `m5.xlarge` | `D4s v3` |
|
||||
| Praefect <sup>5</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Praefect PostgreSQL <sup>1</sup> | 1+ | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Sidekiq <sup>7</sup> | 2 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` | `D2s v3` |
|
||||
| GitLab Rails <sup>7</sup> | 3 | 8 vCPU, 7.2 GB memory | `n1-highcpu-8` | `c5.2xlarge` | `F8s v2` |
|
||||
| Monitoring node | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Object storage<sup>4</sup> | - | - | - | - | - |
|
||||
| Object storage <sup>4</sup> | - | - | - | - | - |
|
||||
|
||||
**Footnotes:**
|
||||
|
||||
<!-- Disable ordered list rule https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md029---ordered-list-item-prefix -->
|
||||
<!-- markdownlint-disable MD029 -->
|
||||
1. Can be optionally run on reputable third-party external PaaS PostgreSQL solutions. See [Provide your own PostgreSQL instance](#provide-your-own-postgresql-instance) for more information.
|
||||
2. Can be optionally run on reputable third-party external PaaS Redis solutions. See [Provide your own Redis instance](#provide-your-own-redis-instance) for more information.
|
||||
3. Can be optionally run on reputable third-party load balancing services (LB PaaS). See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
4. Should be run on reputable Cloud Provider or Self Managed solutions. See [Configure the object storage](#configure-the-object-storage) for more information.
|
||||
5. Gitaly Cluster provides the benefits of fault tolerance, but comes with additional complexity of setup and management.
|
||||
1. Can be optionally run on reputable third-party external PaaS Redis solutions. See [Provide your own Redis instance](#provide-your-own-redis-instance) for more information.
|
||||
1. Can be optionally run on reputable third-party load balancing services (LB PaaS). See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
1. Should be run on reputable Cloud Provider or Self Managed solutions. See [Configure the object storage](#configure-the-object-storage) for more information.
|
||||
1. Gitaly Cluster provides the benefits of fault tolerance, but comes with additional complexity of setup and management.
|
||||
Review the existing [technical limitations and considerations before deploying Gitaly Cluster](../gitaly/index.md#before-deploying-gitaly-cluster). If you want sharded Gitaly, use the same specs listed above for `Gitaly`.
|
||||
6. Gitaly specifications are based on high percentiles of both usage patterns and repository sizes in good health.
|
||||
1. Gitaly specifications are based on high percentiles of both usage patterns and repository sizes in good health.
|
||||
However, if you have [large monorepos](index.md#large-monorepos) (larger than several gigabytes) or [additional workloads](index.md#additional-workloads) these can *significantly* impact Git and Gitaly performance and further adjustments will likely be required.
|
||||
7. Can be placed in Auto Scaling Groups (ASGs) as the component doesn't store any [stateful data](index.md#autoscaling-of-stateful-nodes).
|
||||
1. Can be placed in Auto Scaling Groups (ASGs) as the component doesn't store any [stateful data](index.md#autoscaling-of-stateful-nodes).
|
||||
However, for GitLab Rails certain processes like [migrations](#gitlab-rails-post-configuration) and [Mailroom](../incoming_email.md) should be run on only one node.
|
||||
<!-- markdownlint-enable MD029 -->
|
||||
|
||||
NOTE:
|
||||
For all PaaS solutions that involve configuring instances, it is strongly recommended to implement a minimum of three nodes in three different availability zones to align with resilient cloud architecture practices.
|
||||
|
|
@ -2282,27 +2281,26 @@ services where applicable):
|
|||
|
||||
| Service | Nodes | Configuration | GCP | AWS |
|
||||
|-------------------------------------------|-------|-----------------------|-----------------|-------------|
|
||||
| Redis<sup>2</sup> | 3 | 2 vCPU, 7.5 GB memory | `n1-standard-2` | `m5.large` |
|
||||
| Consul<sup>1</sup> + Sentinel<sup>2</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| PostgreSQL<sup>1</sup> | 3 | 2 vCPU, 7.5 GB memory | `n1-standard-2` | `m5.large` |
|
||||
| PgBouncer<sup>1</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Internal load balancing node<sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Gitaly<sup>5</sup> | 3 | 4 vCPU, 15 GB memory<sup>6</sup> | `n1-standard-4` | `m5.xlarge` |
|
||||
| Praefect<sup>5</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Praefect PostgreSQL<sup>1</sup> | 1+ | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Object storage<sup>4</sup> | - | - | - | - |
|
||||
| Redis <sup>2</sup> | 3 | 2 vCPU, 7.5 GB memory | `n1-standard-2` | `m5.large` |
|
||||
| Consul <sup>1</sup> + Sentinel <sup>2</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| PostgreSQL <sup>1</sup> | 3 | 2 vCPU, 7.5 GB memory | `n1-standard-2` | `m5.large` |
|
||||
| PgBouncer <sup>1</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Internal load balancing node <sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Gitaly <sup>5</sup> | 3 | 4 vCPU, 15 GB memory <sup>6</sup> | `n1-standard-4` | `m5.xlarge` |
|
||||
| Praefect <sup>5</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Praefect PostgreSQL <sup>1</sup> | 1+ | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Object storage <sup>4</sup> | - | - | - | - |
|
||||
|
||||
**Footnotes:**
|
||||
|
||||
<!-- Disable ordered list rule https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md029---ordered-list-item-prefix -->
|
||||
<!-- markdownlint-disable MD029 -->
|
||||
1. Can be optionally run on reputable third-party external PaaS PostgreSQL solutions. See [Provide your own PostgreSQL instance](#provide-your-own-postgresql-instance) for more information.
|
||||
2. Can be optionally run on reputable third-party external PaaS Redis solutions. See [Provide your own Redis instance](#provide-your-own-redis-instance) for more information.
|
||||
3. Can be optionally run on reputable third-party load balancing services (LB PaaS). See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
4. Should be run on reputable Cloud Provider or Self Managed solutions. See [Configure the object storage](#configure-the-object-storage) for more information.
|
||||
5. Gitaly Cluster provides the benefits of fault tolerance, but comes with additional complexity of setup and management.
|
||||
1. Can be optionally run on reputable third-party external PaaS Redis solutions. See [Provide your own Redis instance](#provide-your-own-redis-instance) for more information.
|
||||
1. Can be optionally run on reputable third-party load balancing services (LB PaaS). See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
1. Should be run on reputable Cloud Provider or Self Managed solutions. See [Configure the object storage](#configure-the-object-storage) for more information.
|
||||
1. Gitaly Cluster provides the benefits of fault tolerance, but comes with additional complexity of setup and management.
|
||||
Review the existing [technical limitations and considerations before deploying Gitaly Cluster](../gitaly/index.md#before-deploying-gitaly-cluster). If you want sharded Gitaly, use the same specs listed above for `Gitaly`.
|
||||
6. Gitaly specifications are based on high percentiles of both usage patterns and repository sizes in good health.
|
||||
1. Gitaly specifications are based on high percentiles of both usage patterns and repository sizes in good health.
|
||||
However, if you have [large monorepos](index.md#large-monorepos) (larger than several gigabytes) or [additional workloads](index.md#additional-workloads) these can *significantly* impact Git and Gitaly performance and further adjustments will likely be required.
|
||||
<!-- markdownlint-enable MD029 -->
|
||||
|
||||
NOTE:
|
||||
For all PaaS solutions that involve configuring instances, it is strongly recommended to implement a minimum of three nodes in three different availability zones to align with resilient cloud architecture practices.
|
||||
|
|
|
|||
|
|
@ -26,35 +26,34 @@ specifically the [Before you start](index.md#before-you-start) and [Deciding whi
|
|||
> - **Cloud Native Hybrid Alternative:** [Yes](#cloud-native-hybrid-reference-architecture-with-helm-charts-alternative)
|
||||
> - **Unsure which Reference Architecture to use?** [Go to this guide for more info](index.md#deciding-which-architecture-to-use)
|
||||
|
||||
| Service | Nodes | Configuration | GCP | AWS | Azure |
|
||||
|-------------------------------------------|-------|-------------------------|-----------------|--------------|----------|
|
||||
| External load balancing node<sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Redis<sup>2</sup> | 3 | 2 vCPU, 7.5 GB memory | `n1-standard-2` | `m5.large` | `D2s v3` |
|
||||
| Consul<sup>1</sup> + Sentinel<sup>2</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| PostgreSQL<sup>1</sup> | 3 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` | `D4s v3` |
|
||||
| PgBouncer<sup>1</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Internal load balancing node<sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Gitaly<sup>5</sup> | 3 | 8 vCPU, 30 GB memory<sup>6</sup> | `n1-standard-8` | `m5.2xlarge` | `D8s v3` |
|
||||
| Praefect<sup>5</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Praefect PostgreSQL<sup>1</sup> | 1+ | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Sidekiq<sup>7</sup> | 2 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` | `D2s v3` |
|
||||
| GitLab Rails<sup>7</sup> | 3 | 16 vCPU, 14.4 GB memory | `n1-highcpu-16` | `c5.4xlarge` | `F16s v2`|
|
||||
| Monitoring node | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Object storage<sup>4</sup> | - | - | - | - | - |
|
||||
| Service | Nodes | Configuration | GCP | AWS | Azure |
|
||||
|---------------------------------------------|-------|-------------------------|-----------------|--------------|----------|
|
||||
| External load balancing node <sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Redis <sup>2</sup> | 3 | 2 vCPU, 7.5 GB memory | `n1-standard-2` | `m5.large` | `D2s v3` |
|
||||
| Consul <sup>1</sup> + Sentinel <sup>2</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| PostgreSQL <sup>1</sup> | 3 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` | `D4s v3` |
|
||||
| PgBouncer <sup>1</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Internal load balancing node <sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Gitaly <sup>5</sup> | 3 | 8 vCPU, 30 GB memory <sup>6</sup> | `n1-standard-8` | `m5.2xlarge` | `D8s v3` |
|
||||
| Praefect <sup>5</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Praefect PostgreSQL <sup>1</sup> | 1+ | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Sidekiq <sup>7</sup> | 2 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` | `D2s v3` |
|
||||
| GitLab Rails <sup>7</sup> | 3 | 16 vCPU, 14.4 GB memory | `n1-highcpu-16` | `c5.4xlarge` | `F16s v2`|
|
||||
| Monitoring node | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` | `F2s v2` |
|
||||
| Object storage <sup>4</sup> | - | - | - | - | - |
|
||||
|
||||
**Footnotes:**
|
||||
|
||||
<!-- Disable ordered list rule https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md029---ordered-list-item-prefix -->
|
||||
<!-- markdownlint-disable MD029 -->
|
||||
1. Can be optionally run on reputable third-party external PaaS PostgreSQL solutions. See [Provide your own PostgreSQL instance](#provide-your-own-postgresql-instance) for more information.
|
||||
2. Can be optionally run on reputable third-party external PaaS Redis solutions. See [Provide your own Redis instance](#provide-your-own-redis-instance) for more information.
|
||||
3. Can be optionally run on reputable third-party load balancing services (LB PaaS). See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
4. Should be run on reputable Cloud Provider or Self Managed solutions. See [Configure the object storage](#configure-the-object-storage) for more information.
|
||||
5. Gitaly Cluster provides the benefits of fault tolerance, but comes with additional complexity of setup and management.
|
||||
1. Can be optionally run on reputable third-party external PaaS Redis solutions. See [Provide your own Redis instance](#provide-your-own-redis-instance) for more information.
|
||||
1. Can be optionally run on reputable third-party load balancing services (LB PaaS). See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
1. Should be run on reputable Cloud Provider or Self Managed solutions. See [Configure the object storage](#configure-the-object-storage) for more information.
|
||||
1. Gitaly Cluster provides the benefits of fault tolerance, but comes with additional complexity of setup and management.
|
||||
Review the existing [technical limitations and considerations before deploying Gitaly Cluster](../gitaly/index.md#before-deploying-gitaly-cluster). If you want sharded Gitaly, use the same specs listed above for `Gitaly`.
|
||||
6. Gitaly specifications are based on high percentiles of both usage patterns and repository sizes in good health.
|
||||
1. Gitaly specifications are based on high percentiles of both usage patterns and repository sizes in good health.
|
||||
However, if you have [large monorepos](index.md#large-monorepos) (larger than several gigabytes) or [additional workloads](index.md#additional-workloads) these can *significantly* impact Git and Gitaly performance and further adjustments will likely be required.
|
||||
7. Can be placed in Auto Scaling Groups (ASGs) as the component doesn't store any [stateful data](index.md#autoscaling-of-stateful-nodes).
|
||||
1. Can be placed in Auto Scaling Groups (ASGs) as the component doesn't store any [stateful data](index.md#autoscaling-of-stateful-nodes).
|
||||
However, for GitLab Rails certain processes like [migrations](#gitlab-rails-post-configuration) and [Mailroom](../incoming_email.md) should be run on only one node.
|
||||
<!-- markdownlint-enable MD029 -->
|
||||
|
||||
NOTE:
|
||||
For all PaaS solutions that involve configuring instances, it is strongly recommended to implement a minimum of three nodes in three different availability zones to align with resilient cloud architecture practices.
|
||||
|
|
@ -2255,29 +2254,28 @@ the overall makeup as desired as long as the minimum CPU and Memory requirements
|
|||
Next are the backend components that run on static compute VMs using the Linux package (or External PaaS
|
||||
services where applicable):
|
||||
|
||||
| Service | Nodes | Configuration | GCP | AWS |
|
||||
|-------------------------------------------|-------|-----------------------|-----------------|--------------|
|
||||
| Redis<sup>2</sup> | 3 | 2 vCPU, 7.5 GB memory | `n1-standard-2` | `m5.large` |
|
||||
| Consul<sup>1</sup> + Sentinel<sup>2</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| PostgreSQL<sup>1</sup> | 3 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` |
|
||||
| PgBouncer<sup>1</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Internal load balancing node<sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Gitaly<sup>5</sup> | 3 | 8 vCPU, 30 GB memory<sup>6</sup> | `n1-standard-8` | `m5.2xlarge` |
|
||||
| Praefect<sup>5</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Praefect PostgreSQL<sup>1</sup> | 1+ | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Object storage<sup>4</sup> | - | - | - | - |
|
||||
| Service | Nodes | Configuration | GCP | AWS |
|
||||
|---------------------------------------------|-------|-----------------------|-----------------|--------------|
|
||||
| Redis <sup>2</sup> | 3 | 2 vCPU, 7.5 GB memory | `n1-standard-2` | `m5.large` |
|
||||
| Consul <sup>1</sup> + Sentinel <sup>2</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| PostgreSQL <sup>1</sup> | 3 | 4 vCPU, 15 GB memory | `n1-standard-4` | `m5.xlarge` |
|
||||
| PgBouncer <sup>1</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Internal load balancing node <sup>3</sup> | 1 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Gitaly <sup>5</sup> | 3 | 8 vCPU, 30 GB memory <sup>6</sup> | `n1-standard-8` | `m5.2xlarge` |
|
||||
| Praefect <sup>5</sup> | 3 | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Praefect PostgreSQL <sup>1</sup> | 1+ | 2 vCPU, 1.8 GB memory | `n1-highcpu-2` | `c5.large` |
|
||||
| Object storage <sup>4</sup> | - | - | - | - |
|
||||
|
||||
**Footnotes:**
|
||||
|
||||
<!-- Disable ordered list rule https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md029---ordered-list-item-prefix -->
|
||||
<!-- markdownlint-disable MD029 -->
|
||||
1. Can be optionally run on reputable third-party external PaaS PostgreSQL solutions. See [Provide your own PostgreSQL instance](#provide-your-own-postgresql-instance) for more information.
|
||||
2. Can be optionally run on reputable third-party external PaaS Redis solutions. See [Provide your own Redis instance](#provide-your-own-redis-instance) for more information.
|
||||
3. Can be optionally run on reputable third-party load balancing services (LB PaaS). See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
4. Should be run on reputable Cloud Provider or Self Managed solutions. See [Configure the object storage](#configure-the-object-storage) for more information.
|
||||
5. Gitaly Cluster provides the benefits of fault tolerance, but comes with additional complexity of setup and management.
|
||||
1. Can be optionally run on reputable third-party external PaaS Redis solutions. See [Provide your own Redis instance](#provide-your-own-redis-instance) for more information.
|
||||
1. Can be optionally run on reputable third-party load balancing services (LB PaaS). See [Recommended cloud providers and services](index.md#recommended-cloud-providers-and-services) for more information.
|
||||
1. Should be run on reputable Cloud Provider or Self Managed solutions. See [Configure the object storage](#configure-the-object-storage) for more information.
|
||||
1. Gitaly Cluster provides the benefits of fault tolerance, but comes with additional complexity of setup and management.
|
||||
Review the existing [technical limitations and considerations before deploying Gitaly Cluster](../gitaly/index.md#before-deploying-gitaly-cluster). If you want sharded Gitaly, use the same specs listed above for `Gitaly`.
|
||||
6. Gitaly specifications are based on high percentiles of both usage patterns and repository sizes in good health.
|
||||
1. Gitaly specifications are based on high percentiles of both usage patterns and repository sizes in good health.
|
||||
However, if you have [large monorepos](index.md#large-monorepos) (larger than several gigabytes) or [additional workloads](index.md#additional-workloads) these can *significantly* impact Git and Gitaly performance and further adjustments will likely be required.
|
||||
<!-- markdownlint-enable MD029 -->
|
||||
|
||||
NOTE:
|
||||
For all PaaS solutions that involve configuring instances, it is strongly recommended to implement a minimum of three nodes in three different availability zones to align with resilient cloud architecture practices.
|
||||
|
|
|
|||
|
|
@ -339,6 +339,19 @@ By default, new users can create top-level groups. GitLab administrators can pre
|
|||
1. Expand **Account and limit**.
|
||||
1. Clear the **Allow new users to create top-level groups** checkbox.
|
||||
|
||||
## Prevent non-members from creating projects and groups
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/426279) in GitLab 16.8
|
||||
|
||||
By default, users with the Guest role can create projects and groups.
|
||||
GitLab administrators can prevent this behavior:
|
||||
|
||||
1. On the left sidebar, at the bottom, select **Admin Area**.
|
||||
1. Select **Settings > General**.
|
||||
1. Expand **Account and limit**.
|
||||
1. Clear the **Allow users with up to Guest role to create groups and personal projects** checkbox.
|
||||
1. Select **Save changes**.
|
||||
|
||||
## Set profiles of new users to private by default
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/231301) in GitLab 15.8.
|
||||
|
|
@ -349,6 +362,7 @@ By default, newly created users have a public profile. GitLab administrators can
|
|||
1. Select **Settings > General**.
|
||||
1. Expand **Account and limit**.
|
||||
1. Select the **Make new users' profiles private by default** checkbox.
|
||||
1. Select **Save changes**.
|
||||
|
||||
## Prevent users from deleting their accounts
|
||||
|
||||
|
|
|
|||
|
|
@ -205,16 +205,17 @@ The default is `150`.
|
|||
1. Change the value of **Maximum includes**.
|
||||
1. Select **Save changes** for the changes to take effect.
|
||||
|
||||
## Maximum downstream pipelines triggered per project
|
||||
## Maximum downstream pipeline trigger rate
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/144077) in GitLab 16.10 [with feature flag](../feature_flags.md) named `ci_rate_limit_downstream_pipelines`. Disabled by default.
|
||||
|
||||
The maximum number of [downstream pipelines](../../ci/pipelines/downstream_pipelines.md) per project per user can be set at the instance level.
|
||||
The maximum number of [downstream pipelines](../../ci/pipelines/downstream_pipelines.md) that can be triggered per minute
|
||||
(for a given project, user, and commit) can be set at the instance level.
|
||||
The default is `0` (no restriction).
|
||||
|
||||
1. On the left sidebar, at the bottom, select **Admin Area**.
|
||||
1. Select **Settings > CI/CD**.
|
||||
1. Change the value of **Maximum downstream pipelines triggered in a project per user**.
|
||||
1. Change the value of **Maximum downstream pipeline trigger rate**.
|
||||
1. Select **Save changes** for the changes to take effect.
|
||||
|
||||
## Default CI/CD configuration file
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** Self-managed, GitLab Dedicated
|
||||
**Offering:** Self-managed
|
||||
|
||||
This API is for managing Flipper-based [feature flags used in development of GitLab](../development/feature_flags/index.md).
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Premium, Ultimate
|
||||
**Offering:** Self-managed, GitLab Dedicated
|
||||
**Offering:** Self-managed
|
||||
|
||||
WARNING:
|
||||
The Geo Nodes API was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/369140) in GitLab 16.0
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Premium, Ultimate
|
||||
**Offering:** Self-managed, GitLab Dedicated
|
||||
**Offering:** Self-managed
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/369140) in GitLab 16.0.
|
||||
|
||||
|
|
|
|||
|
|
@ -25291,6 +25291,7 @@ Represents vulnerability finding of a security report on the pipeline.
|
|||
| <a id="projectlanguages"></a>`languages` | [`[RepositoryLanguage!]`](#repositorylanguage) | Programming languages used in the project. |
|
||||
| <a id="projectlastactivityat"></a>`lastActivityAt` | [`Time`](#time) | Timestamp of the project last activity. |
|
||||
| <a id="projectlfsenabled"></a>`lfsEnabled` | [`Boolean`](#boolean) | Indicates if the project has Large File Storage (LFS) enabled. |
|
||||
| <a id="projectmarkedfordeletionon"></a>`markedForDeletionOn` **{warning-solid}** | [`Time`](#time) | **Introduced** in GitLab 16.10. **Status**: Experiment. Date when project was scheduled to be deleted. |
|
||||
| <a id="projectmaxaccesslevel"></a>`maxAccessLevel` | [`AccessLevel!`](#accesslevel) | The maximum access level of the current user in the project. |
|
||||
| <a id="projectmergecommittemplate"></a>`mergeCommitTemplate` | [`String`](#string) | Template used to create merge commit message in merge requests. |
|
||||
| <a id="projectmergerequestsaccesslevel"></a>`mergeRequestsAccessLevel` | [`ProjectFeatureAccess`](#projectfeatureaccess) | Access level required for merge requests access. |
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** Self-managed, GitLab Dedicated
|
||||
**Offering:** Self-managed
|
||||
|
||||
To interact with license endpoints, you need to authenticate yourself as an
|
||||
administrator.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** Self-managed, GitLab Dedicated
|
||||
**Offering:** Self-managed
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/54232) in GitLab 13.10.
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** Self-managed, GitLab Dedicated
|
||||
**Offering:** Self-managed
|
||||
|
||||
These API calls allow you to read and modify GitLab instance
|
||||
[application settings](#list-of-settings-that-can-be-accessed-via-api-calls)
|
||||
|
|
@ -393,7 +393,7 @@ listed in the descriptions of the relevant settings.
|
|||
| `domain_denylist_enabled` | boolean | no | (**If enabled, requires:** `domain_denylist`) Allows blocking sign-ups from emails from specific domains. |
|
||||
| `domain_denylist` | array of strings | no | Users with email addresses that match these domains **cannot** sign up. Wildcards allowed. Use separate lines for multiple entries. For example: `domain.com`, `*.domain.com`. |
|
||||
| `domain_allowlist` | array of strings | no | Force people to use only corporate emails for sign-up. Default is `null`, meaning there is no restriction. |
|
||||
| `downstream_pipeline_trigger_limit_per_project_user_sha` | integer | no | Rate limit creation of downstream pipelines. Default: `0`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/144077) in GitLab 16.10 with a [flag](../administration/feature_flags.md) named `ci_rate_limit_downstream_pipelines`. Disabled by default. |
|
||||
| `downstream_pipeline_trigger_limit_per_project_user_sha` | integer | no | [Maximum downstream pipeline trigger rate](../administration/settings/continuous_integration.md#maximum-downstream-pipeline-trigger-rate). Default: `0`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/144077) in GitLab 16.10 with a [flag](../administration/feature_flags.md) named `ci_rate_limit_downstream_pipelines`. Disabled by default. |
|
||||
| `dsa_key_restriction` | integer | no | The minimum allowed bit length of an uploaded DSA key. Default is `0` (no restriction). `-1` disables DSA keys. |
|
||||
| `ecdsa_key_restriction` | integer | no | The minimum allowed curve size (in bits) of an uploaded ECDSA key. Default is `0` (no restriction). `-1` disables ECDSA keys. |
|
||||
| `ecdsa_sk_key_restriction` | integer | no | The minimum allowed curve size (in bits) of an uploaded ECDSA_SK key. Default is `0` (no restriction). `-1` disables ECDSA_SK keys. |
|
||||
|
|
@ -552,6 +552,7 @@ listed in the descriptions of the relevant settings.
|
|||
| `recaptcha_private_key` | string | required by: `recaptcha_enabled` | Private key for reCAPTCHA. |
|
||||
| `recaptcha_site_key` | string | required by: `recaptcha_enabled` | Site key for reCAPTCHA. |
|
||||
| `receive_max_input_size` | integer | no | Maximum push size (MB). |
|
||||
| `remember_me_enabled` | boolean | no | Enable [**Remember me** setting](../administration/settings/account_and_limit_settings.md#turn-remember-me-on-or-off). [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/369133) in GitLab 16.0. |
|
||||
| `repository_checks_enabled` | boolean | no | GitLab periodically runs `git fsck` in all project and wiki repositories to look for silent disk corruption issues. |
|
||||
| `repository_size_limit` | integer | no | Size limit per repository (MB). Premium and Ultimate only. |
|
||||
| `repository_storages_weighted` | hash of strings to integers | no | (GitLab 13.1 and later) Hash of names of taken from `gitlab.yml` to [weights](../administration/repository_storage_paths.md#configure-where-new-repositories-are-stored). New projects are created in one of these stores, chosen by a weighted random selection. |
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** Self-managed, GitLab Dedicated
|
||||
**Offering:** Self-managed
|
||||
|
||||
All methods require administrator authorization.
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ Create GitLab as a IAM OIDC provider in AWS following these [instructions](https
|
|||
|
||||
Include the following information:
|
||||
|
||||
- **Provider URL**: The address of your GitLab instance, such as `https://gitlab.com` or `http://gitlab.example.com`.
|
||||
- **Provider URL**: The address of your GitLab instance, such as `https://gitlab.com` or `http://gitlab.example.com`. This address must be publically accessible.
|
||||
- **Audience**: The address of your GitLab instance, such as `https://gitlab.com` or `http://gitlab.example.com`.
|
||||
- The address must include `https://`.
|
||||
- Do not include a trailing slash.
|
||||
|
|
@ -125,3 +125,22 @@ review the certificate chain, replacing `gitlab.example.com` with your GitLab ho
|
|||
```shell
|
||||
echo | /opt/gitlab/embedded/bin/openssl s_client -connect gitlab.example.com:443
|
||||
```
|
||||
|
||||
### `Couldn't retrieve verification key from your identity provider` error
|
||||
|
||||
You might receive an error similar to:
|
||||
|
||||
- `An error occurred (InvalidIdentityToken) when calling the AssumeRoleWithWebIdentity operation: Couldn't retrieve verification key from your identity provider, please reference AssumeRoleWithWebIdentity documentation for requirements`
|
||||
|
||||
This error might be because:
|
||||
|
||||
- The `.well_known` URL and `jwks_uri` of the identity provider (IdP) are inaccessible from the public internet.
|
||||
- A custom firewall is blocking the requests.
|
||||
- There's latency of more than 5 seconds in API requests from the IdP to reach the AWS STS endpoint.
|
||||
- STS is making too many requests to your `.well_known` URL or the `jwks_uri` of the IdP.
|
||||
|
||||
As documented in the [AWS Knowledge Center article for this error](https://repost.aws/knowledge-center/iam-sts-invalididentitytoken),
|
||||
your GitLab instance needs to be publicly accessible so that the `.well_known` URL and `jwks_uri` can be resolved.
|
||||
If this is not possible, for example if your GitLab instance is in an offline environment,
|
||||
you can follow [issue #391928](https://gitlab.com/gitlab-org/gitlab/-/issues/391928)
|
||||
where a workaround and more permanent solution is being investigated.
|
||||
|
|
|
|||
|
|
@ -16,6 +16,12 @@ Test cases in GitLab can help your teams create testing scenarios in their exist
|
|||
Now your Implementation and Testing teams can collaborate better, as they no longer have to
|
||||
use external test planning tools, which require additional overhead, context switching, and expense.
|
||||
|
||||
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
|
||||
To learn how to use issues and epics to manage your requirements and testing needs
|
||||
while integrating with your development workflows, see
|
||||
[Streamline Software Development: Integrating Requirements, Testing, and Development Workflows](https://www.youtube.com/watch?v=wbfWM4y2VmM).
|
||||
<!-- Video published on 2024-02-21 -->
|
||||
|
||||
NOTE:
|
||||
[Requirements](../../user/project/requirements/index.md) and test cases are being
|
||||
[migrated to work items](https://gitlab.com/groups/gitlab-org/-/epics/5171).
|
||||
|
|
|
|||
|
|
@ -734,7 +734,7 @@ For example:
|
|||
|
||||
When you add a footnote, do not re-sort the existing tags in the table.
|
||||
|
||||
For the footnotes below the table, use **Footnotes:** followed by an ordered list.
|
||||
For the footnotes below the table, use `**Footnotes:**` followed by an ordered list.
|
||||
|
||||
For example:
|
||||
|
||||
|
|
|
|||
|
|
@ -77,20 +77,9 @@ Remember:
|
|||
The documentation under `/doc/solutions` is created, maintained, copy edited,
|
||||
and merged by the Solutions Architect team.
|
||||
|
||||
## Do not use ChatGPT or AI-generated content for the docs
|
||||
## AI-generated content
|
||||
|
||||
GitLab documentation is distributed under the [CC BY-SA 4.0 license](https://creativecommons.org/licenses/by-sa/4.0/), which presupposes that GitLab owns the documentation.
|
||||
|
||||
Under current law in the US and the EU, it's possible that AI-generated works might either:
|
||||
|
||||
- not be owned by anyone because they weren't created by a human, or
|
||||
- belong to the AI training data's creator, if the AI verbatim reproduces content that it trained on
|
||||
|
||||
If the documentation contains AI-generated content, GitLab probably wouldn't own this content, which would risk invalidating the CC BY-SA 4.0 license.
|
||||
|
||||
Contributions to GitLab documentation are made under either our [DCO or our CLA terms](https://about.gitlab.com/community/contribute/dco-cla/). In both, contributors have to make certain certifications about the authorship of their work that they can't validly make for AI-generated text.
|
||||
|
||||
For these reasons, do not add AI-generated content to the documentation.
|
||||
You can make AI-generated contributions to GitLab documentation, provided you follow the guidelines in our [DCO or our CLA terms](https://about.gitlab.com/community/contribute/dco-cla/).
|
||||
|
||||
## Related topics
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ Feature flags help reduce risk, allowing you to do controlled testing, and separ
|
|||
delivery from customer launch.
|
||||
|
||||
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
|
||||
For an example of feature flags in action, see [Feature Flags configuration, instrumentation and use](https://www.youtube.com/watch?v=ViA6suScxkE).
|
||||
For an example of feature flags in action, see [Eliminating risk with feature flags](https://www.youtube.com/watch?v=U9WqoK9froI).
|
||||
<!-- Video published on 2024-02-01 -->
|
||||
|
||||
For a click-through demo, see [Feature Flags](https://go.gitlab.com/YKuzLt).
|
||||
<!-- Demo published on 2023-07-13 -->
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ When configuring an escalation rule, you can designate who to page:
|
|||
When a notification is sent to a user through an on-call schedule or directly, a system note listing
|
||||
the paged users is created on the alert.
|
||||
|
||||
The time specified for an escalation rule must be between 0 and 1440 minutes.
|
||||
|
||||
## Edit an escalation policy
|
||||
|
||||
To update an escalation policy:
|
||||
|
|
|
|||
|
|
@ -8,15 +8,13 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Ultimate
|
||||
**Offering:** Self-managed
|
||||
**Offering:** GitLab.com
|
||||
**Status:** Experiment
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124966) in GitLab 16.7 [with a flag](../administration/feature_flags.md) named `observability_metrics`. Disabled by default. This feature is an [Experiment](../policy/experiment-beta-support.md#experiment).
|
||||
|
||||
FLAG:
|
||||
On self-managed GitLab, by default this feature is not available.
|
||||
To make it available, an administrator can [enable the feature flag](../administration/feature_flags.md) named `observability_metrics`.
|
||||
On GitLab.com and GitLab Dedicated, this feature is not available.
|
||||
This feature is only available on GitLab.com. On self-managed GitLab and GitLab Dedicated, by default this feature is not available.
|
||||
The feature is not ready for production use.
|
||||
|
||||
Metrics provide insight about the operational health of monitored systems.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** Self-managed, GitLab Dedicated
|
||||
**Offering:** Self-managed
|
||||
|
||||
GitLab provides [Rake](https://ruby.github.io/rake/) tasks to assist you with common administration and operational
|
||||
processes.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** Self-managed, GitLab Dedicated
|
||||
**Offering:** Self-managed
|
||||
|
||||
WARNING:
|
||||
This feature was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/384361) in GitLab 16.7 and is planned for removal in 17.0.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Ultimate
|
||||
**Offering:** Self-managed, GitLab Dedicated
|
||||
**Offering:** Self-managed
|
||||
|
||||
GitLab provides a Rake task for uploading a fresh copy of the [SPDX license list](https://spdx.org/licenses/)
|
||||
to a GitLab instance. This list is needed for matching the names of [License approval policies](../user/compliance/license_approval_policies.md).
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** Self-managed, GitLab Dedicated
|
||||
**Offering:** Self-managed
|
||||
|
||||
GitLab provides Rake tasks for managing users. Administrators can also use the Admin Area to
|
||||
[manage users](../administration/admin_area.md#administering-users).
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** Self-managed, GitLab Dedicated
|
||||
**Offering:** Self-managed
|
||||
|
||||
GitLab provides Rake tasks for webhooks management.
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** Self-managed, GitLab Dedicated
|
||||
**Offering:** Self-managed
|
||||
|
||||
When [signing commits with X.509](../user/project/repository/signed_commits/x509.md),
|
||||
the trust anchor might change and the signatures stored within the database must be updated.
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Premium, Ultimate
|
||||
**Offering:** Self-managed, GitLab Dedicated
|
||||
**Offering:** Self-managed
|
||||
|
||||
After you subscribe to GitLab, you can manage the details of your self-managed subscription.
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** Self-managed, GitLab Dedicated
|
||||
**Offering:** Self-managed
|
||||
|
||||
Computers in an offline environment are isolated from the public internet as a security measure. This
|
||||
page lists all the information available for running GitLab in an offline environment.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** Self-managed, GitLab Dedicated
|
||||
**Offering:** Self-managed
|
||||
|
||||
This is a step-by-step guide that helps you install, configure, and use a self-managed GitLab
|
||||
instance entirely offline.
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ to go from an idea to production, and identify inefficiencies in the development
|
|||
To get started, create a value stream in the `My website` project:
|
||||
|
||||
1. Select **Analyze > Value Stream Analytics**.
|
||||
1. Select **Create new Value Stream**.
|
||||
1. Select **New Value Stream**.
|
||||
1. Enter a name for the value stream, for example `My website value stream`.
|
||||
1. Select **Create from default template**.
|
||||
1. To add a custom stage, select **Add another stage**.
|
||||
|
|
|
|||
|
|
@ -210,19 +210,50 @@ Latest templates can receive breaking changes in any release.
|
|||
For more information about template versioning, see the
|
||||
[CI/CD documentation](../../development/cicd/templates.md#latest-version).
|
||||
|
||||
## Default behavior of GitLab security scanning tools
|
||||
## Security scanning
|
||||
|
||||
### Secure jobs in your pipeline
|
||||
For security scans that run in a CI/CD pipeline, the results are determined by:
|
||||
|
||||
If you add the security scanning jobs as described in [Security scanning with Auto DevOps](#security-scanning-with-auto-devops) or [Security scanning without Auto DevOps](#security-scanning-without-auto-devops) to your `.gitlab-ci.yml` each added [security scanning tool](#application-coverage) behave as described below.
|
||||
- Which security scanning jobs run in the pipeline.
|
||||
- Each job's status.
|
||||
- Each job's output.
|
||||
|
||||
For each compatible analyzer, a job is created in the `test`, `dast` or `fuzz` stage of your pipeline and runs on the next new branch pipeline.
|
||||
Features such as the [Security Dashboard](security_dashboard/index.md), [Vulnerability Report](vulnerability_report/index.md), and [Dependency List](dependency_list/index.md)
|
||||
that rely on this scan data only show results from pipelines on the default branch, only if all jobs are finished, including manual ones. One tool might use many analyzers.
|
||||
### Security jobs in your pipeline
|
||||
|
||||
Our language and package manager specific jobs attempt to assess which analyzers they should run for your project so that you can do less configuration.
|
||||
The security scanning jobs that run in a CI/CD pipeline are determined by the following criteria:
|
||||
|
||||
If you want to override this to increase the pipeline speed, you may choose which analyzers to exclude if you know they are not applicable (languages or package managers not contained in your project) by following variable customization directions for that specific tool.
|
||||
1. Inclusion of security scanning templates
|
||||
|
||||
The selection of security scanning jobs is first determined by which templates are included.
|
||||
Templates can be included by using AutoDevOps, a scan execution policy, or the
|
||||
`.gitlab-ci.yml` configuration file.
|
||||
|
||||
1. Evaluation of rules
|
||||
|
||||
Each template has defined [rules](../../ci/yaml/index.md#rules) which determine if the analyzer
|
||||
is run.
|
||||
|
||||
For example, the Secret Detection template includes the following rule. This rule states that
|
||||
secret detection should be run in branch pipelines. In the case of a merge request pipeline,
|
||||
secret detection is not run.
|
||||
|
||||
```yaml
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH
|
||||
```
|
||||
|
||||
1. Analyzer logic
|
||||
|
||||
If the template's rules dictate that the job is to be run, a job is created in the pipeline stage
|
||||
specified in the template. However, each analyzer has its own logic which determines if the
|
||||
analyzer itself is to be run.
|
||||
|
||||
For example, if dependency scanning doesn't detect supported files at the default depth, the
|
||||
analyzer is not run and no artifacts are output.
|
||||
|
||||
After completing successfully, each job outputs artifacts. These artifacts are processed and the
|
||||
results are available in GitLab. Results are shown only if all jobs are finished, including manual
|
||||
ones. Additionally for some features, results are shown only if the pipeline runs on the default branch.
|
||||
|
||||
### Secure job status
|
||||
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ the related documentation.
|
|||
| Maximum registered runners | Free tier: `50` per-group / `50` per-project<br/>All paid tiers: `1000` per-group / `1000` per-project | See [Number of registered runners per scope](../../administration/instance_limits.md#number-of-registered-runners-per-scope). |
|
||||
| Limit of dotenv variables | Free tier: `50` / Premium tier: `100` / Ultimate tier: `150` | See [Limit dotenv variables](../../administration/instance_limits.md#limit-dotenv-variables). |
|
||||
| Authorization token duration (minutes) | `15` | To set a custom value, in the Rails console, run `ApplicationSetting.last.update(container_registry_token_expire_delay: <integer>)`, where `<integer>` is the desired number of minutes. |
|
||||
| Maximum downstream pipelines triggered in a project per user | `350` | See [Maximum downstream pipelines triggered per project](../../administration/settings/continuous_integration.md#maximum-downstream-pipelines-triggered-per-project). |
|
||||
| Maximum downstream pipeline trigger rate (for a given project, user, and commit) | `350` per minute | See [Maximum downstream pipeline trigger rate](../../administration/settings/continuous_integration.md#maximum-downstream-pipeline-trigger-rate). |
|
||||
|
||||
## Package registry limits
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ You can ask questions about how GitLab works. Things like:
|
|||
|
||||
NOTE:
|
||||
This feature is not currently supported in self-managed instances.
|
||||
See [this epic](https://gitlab.com/groups/gitlab-org/-/epics/11600) for more infomation.
|
||||
See [this epic](https://gitlab.com/groups/gitlab-org/-/epics/11600) for more information.
|
||||
|
||||
### Ask about a specific issue
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ You can ask about a specific GitLab issue. For example:
|
|||
You can ask about a specific GitLab epic. For example:
|
||||
|
||||
- `Generate a summary for the epic identified via this link: <link to your epic>`
|
||||
- `Generate a concise summary of the opened epic.`
|
||||
- When you are viewing an epic in GitLab, you can ask `Generate a concise summary of the opened epic.`
|
||||
- `What are the unique use cases raised by commenters in <link to your epic>?`
|
||||
|
||||
### Ask about code
|
||||
|
|
@ -99,6 +99,10 @@ You can also ask GitLab Duo Chat to generate code:
|
|||
|
||||
- `Write a Ruby function that prints 'Hello, World!' when called.`
|
||||
- `Develop a JavaScript program that simulates a two-player Tic-Tac-Toe game. Provide both game logic and user interface, if applicable.`
|
||||
- `Create a regular expression for parsing IPv4 and IPv6 addresses in Python.`
|
||||
- `Generate code for parsing a syslog log file in Java. Use regular expressions when possible, and store the results in a hash map.`
|
||||
- `Create a product-consumer example with threads and shared memory in C++. Use atomic locks when possible.`
|
||||
- `Generate Rust code for high performance gRPC calls. Provide a source code example for a server and client.`
|
||||
|
||||
And you can ask GitLab Duo Chat to explain code:
|
||||
|
||||
|
|
@ -106,6 +110,20 @@ And you can ask GitLab Duo Chat to explain code:
|
|||
|
||||
Alternatively, you can use the [`/explain` command](#explain-code-in-the-ide) to explain the selected code in your editor.
|
||||
|
||||
For more practical examples, see the [GitLab Duo examples](gitlab_duo_examples.md).
|
||||
|
||||
### Ask about errors
|
||||
|
||||
Programming languages that require compiling the source code may throw cryptic error messages. Similarly, a script or a web application could throw a stack trace. You can ask GitLab Duo Chat by prefixing the copied error message with, for example, `Please explain this error message:`. Add the specific context, like the programming language.
|
||||
|
||||
- `Explain this error message in Java: Int and system cannot be resolved to a type`
|
||||
- `Explain when this C function would cause a segmentation fault: sqlite3_prepare_v2()`
|
||||
- `Explain what would cause this error in Python: ValueError: invalid literal for int()`
|
||||
- `Why is "this" undefined in VueJS? Provide common error cases, and explain how to avoid them.`
|
||||
- `How to debug a Ruby on Rails stacktrace? Share common strategies and an example exception.`
|
||||
|
||||
For more practical examples, see the [GitLab Duo examples](gitlab_duo_examples.md).
|
||||
|
||||
### Ask about CI/CD
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/423524) for SaaS in GitLab 16.7.
|
||||
|
|
@ -114,6 +132,19 @@ Alternatively, you can use the [`/explain` command](#explain-code-in-the-ide) to
|
|||
You can ask GitLab Duo Chat to create a CI/CD configuration:
|
||||
|
||||
- `Create a .gitlab-ci.yml configuration file for testing and building a Ruby on Rails application in a GitLab CI/CD pipeline.`
|
||||
- `Create a CI/CD configuration for building and linting a Python application.`
|
||||
- `Create a CI/CD configuration to build and test Rust code.`
|
||||
- `Create a CI/CD configuration for C++. Use gcc as compiler, and cmake as build tool.`
|
||||
- `Create a CI/CD configuration for VueJS. Use npm, and add SAST security scanning.`
|
||||
- `Generate a security scanning pipeline configuration, optimized for Java.`
|
||||
|
||||
You can also ask to explain specific job errors by copy-pasting the error message, prefixed with `Please explain this CI/CD job error message, in the context of <language>:`:
|
||||
|
||||
- `Please explain this CI/CD job error message in the context of a Go project: build.sh: line 14: go command not found`
|
||||
|
||||
Alternatively, you can use [root cause analysis in CI/CD](ai_features.md#root-cause-analysis).
|
||||
|
||||
For more practical examples, see the [GitLab Duo examples](gitlab_duo_examples.md).
|
||||
|
||||
### Explain code in the IDE
|
||||
|
||||
|
|
@ -127,6 +158,16 @@ This feature is available in VS Code and the Web IDE only.
|
|||
You can also add additional instructions to be considered, for example: `/explain the performance`
|
||||
See [Use GitLab Duo Chat in VS Code](#use-gitlab-duo-chat-in-vs-code) for more information.
|
||||
|
||||
- `/explain focus on the algorithm`
|
||||
- `/explain the performance gains or losses using this code`
|
||||
- `/explain the object inheritance` (classes, object-oriented)
|
||||
- `/explain why a static variable is used here` (C++)
|
||||
- `/explain how this function would cause a segmentation fault` (C)
|
||||
- `/explain how concurrency works in this context` (Go)
|
||||
- `/explain how the request reaches the client` (REST API, database)
|
||||
|
||||
For more practical examples, see the [GitLab Duo examples](gitlab_duo_examples.md).
|
||||
|
||||
### Refactor code in the IDE
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/429915) for SaaS in GitLab 16.7.
|
||||
|
|
@ -138,12 +179,17 @@ This feature is available in VS Code and the Web IDE only.
|
|||
`/refactor` is a special command to generate a refactoring suggestion for the selected code in your editor.
|
||||
You can include additional instructions to be considered. For example:
|
||||
|
||||
- Use a specific coding pattern, for example `/refactor with ActiveRecord`.
|
||||
- Use a specific coding pattern, for example `/refactor with ActiveRecord` or `/refactor into a class providing static functions`.
|
||||
- Use a specific library, for example `/refactor using mysql`.
|
||||
- Use a specific function/algorithm, for example `/refactor into a stringstream with multiple lines` in C++.
|
||||
- Refactor to a different programming language, for example `/refactor to TypeScript`.
|
||||
- Focus on performance, for example `/refactor improving performance`.
|
||||
- Focus on potential vulnerabilities, for example `/refactor avoiding memory leaks and exploits`.
|
||||
|
||||
See [Use GitLab Duo Chat in the VS Code](#use-gitlab-duo-chat-in-vs-code) for more information.
|
||||
|
||||
For more practical examples, see the [GitLab Duo examples](gitlab_duo_examples.md).
|
||||
|
||||
### Write tests in the IDE
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/429915) for SaaS in GitLab 16.7.
|
||||
|
|
@ -156,6 +202,13 @@ This feature is available in VS Code and the Web IDE only.
|
|||
You can also add additional instructions to be considered, for example: `/tests using the Boost.Test framework`
|
||||
See [Use GitLab Duo Chat in the VS Code](#use-gitlab-duo-chat-in-vs-code) for more information.
|
||||
|
||||
- Use a specific test framework, for example `/tests using the Boost.test framework` (C++) or `/tests using Jest` (JavaScript).
|
||||
- Focus on extreme test cases, for example `/tests focus on extreme cases, force regression testing`.
|
||||
- Focus on performance, for example `/tests focus on performance`.
|
||||
- Focus on regressions and potential exploits, for example `/tests focus on regressions and potential exploits`.
|
||||
|
||||
For more practical examples, see the [GitLab Duo examples](gitlab_duo_examples.md).
|
||||
|
||||
### Ask follow up questions
|
||||
|
||||
You can ask follow-up questions to delve deeper into the topic or task at hand.
|
||||
|
|
@ -166,6 +219,12 @@ A follow-up to the question `Write a Ruby function that prints 'Hello, World!' w
|
|||
|
||||
- `Can you also explain how I can call and execute this Ruby function in a typical Ruby environment, such as the command line?`
|
||||
|
||||
A follow-up to the question `How to start a C# project?` could be:
|
||||
|
||||
- `Can you also please explain how to add a .gitignore and .gitlab-ci.yml file for C#?`
|
||||
|
||||
For more practical examples, see the [GitLab Duo examples](gitlab_duo_examples.md).
|
||||
|
||||
## Enable GitLab Duo Chat
|
||||
|
||||
### For SaaS users
|
||||
|
|
@ -308,7 +367,7 @@ When you use one of the slash commands you can also add additional instructions
|
|||
|
||||
To disable GitLab Duo Chat in VS Code:
|
||||
|
||||
1. Go to **Settings > Extensions > GitLab Workflow (GitLab VSCode Extension)**.
|
||||
1. Go to **Settings > Extensions > GitLab Workflow (GitLab VS Code Extension)**.
|
||||
1. Clear the **Enable GitLab Duo Chat assistant** checkbox.
|
||||
|
||||
## Give feedback
|
||||
|
|
|
|||
|
|
@ -0,0 +1,514 @@
|
|||
---
|
||||
stage: AI-powered
|
||||
group: Duo Chat
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
# GitLab Duo examples
|
||||
|
||||
The following use cases describe practical examples with GitLab Duo.
|
||||
Learn how to start with software development and refactor existing source code.
|
||||
Dive into debugging problems with root cause analysis, solve security vulnerabilities,
|
||||
and use all stages of the DevSecOps lifecycle.
|
||||
|
||||
## Use GitLab Duo to solve development challenges
|
||||
|
||||
### Start with a C# application
|
||||
|
||||
In this example, open your C# application and start to explore how to use
|
||||
GitLab Duo AI-powered features for more efficiency.
|
||||
|
||||
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
|
||||
Watch these steps in action in [GitLab Duo Coffee Chat: Get started with C#](https://www.youtube.com/watch?v=AdRtX9L--Po)
|
||||
<!-- Video published on 2024-01-30 -->
|
||||
|
||||
The challenge is to create a CLI tool for querying the GitLab REST API.
|
||||
|
||||
- Ask GitLab Duo Chat how to start a new C# project and learn how to use the dotNET CLI:
|
||||
|
||||
```markdown
|
||||
How can I get started creating an empty C# console application in VSCode?
|
||||
```
|
||||
|
||||
- Use Code Suggestions to generate a REST API client with a new code comment:
|
||||
|
||||
```csharp
|
||||
// Connect to a REST API and print the response
|
||||
```
|
||||
|
||||
- The generated source code might need an explanation: Use the code task `/explain`
|
||||
to get an insight how the REST API calls work.
|
||||
|
||||
After successfully generating the source code from a Code Suggestions comment,
|
||||
CI/CD configuration is needed.
|
||||
|
||||
- Chat can help with best practices for a `.gitignore` file for C#:
|
||||
|
||||
```markdown
|
||||
Please show a .gitignore and .gitlab-ci.yml configuration for a C# project.
|
||||
```
|
||||
|
||||
- If your CI/CD job fails, [Root Cause Analysis](ai_features.md#root-cause-analysis)
|
||||
can help understand the problem. Alternatively, you can copy the error message into
|
||||
GitLab Duo Chat, and ask for help:
|
||||
|
||||
```markdown
|
||||
Please explain the CI/CD error: The current .NET SDK does not support targeting
|
||||
.NET 8.0
|
||||
```
|
||||
|
||||
- To create tests later, ask GitLab Duo to use the code task `/refactor` to refactor
|
||||
the selected code into a function.
|
||||
|
||||
- Chat can also explain programming language specific keywords and functions, or C#
|
||||
compiler errors.
|
||||
|
||||
```markdown
|
||||
Can you explain async and await in C# with practical examples?
|
||||
|
||||
explain error CS0122: 'Program' is inaccessible due to its protection level
|
||||
```
|
||||
|
||||
- Generate tests by using the `/tests` code task.
|
||||
|
||||
The next question is where to put the generated tests in C# solutions.
|
||||
As a beginner, you might not know that the application and test projects need to exist on the same solutions level to avoid import problems.
|
||||
|
||||
- GitLab Duo Chat can help by asking and refining the prompt questions:
|
||||
|
||||
```markdown
|
||||
In C# and VS Code, how can I add a reference to a project from a test project?
|
||||
|
||||
Please provide the XML configuration which I can add to a C# .csproj file to add a
|
||||
reference to another project in the existing solution?
|
||||
```
|
||||
|
||||
- Sometimes, you must refine the prompt to get better results. The prompt
|
||||
`/refactor into the public class` creates a proposal for code that can be accessed
|
||||
from the test project later.
|
||||
|
||||
```markdown
|
||||
/refactor into the public class
|
||||
```
|
||||
|
||||
- You can also use the `/refactor` code task to ask Chat how to execute tests in the
|
||||
`.gitlab-ci.yml` file.
|
||||
|
||||
```markdown
|
||||
/refactor add a job to run tests (the test project)
|
||||
```
|
||||
|
||||
Resources:
|
||||
|
||||
- [Project with source code](https://gitlab.com/gitlab-da/use-cases/ai/gitlab-duo-coffee-chat/gitlab-duo-coffee-chat-2024-01-29)
|
||||
|
||||
### Refactor a C++ application with SQLite
|
||||
|
||||
In this example, existing source code with a single main function exists. It repeats code, and cannot be tested.
|
||||
|
||||
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
|
||||
Watch these steps in action in [GitLab Duo Coffee Chat: C++, SQLite and CMake](https://www.youtube.com/watch?v=zGOo1jzQ5zM)
|
||||
<!-- Video published on 2024-01-10 -->
|
||||
|
||||
Refactoring the source code into reusable and testable functions is a great first step.
|
||||
|
||||
1. Open VS Code or the Web IDE with GitLab Duo enabled.
|
||||
1. Select the source code, and ask GitLab Duo Chat to refactor it into functions, using a refined prompt:
|
||||
|
||||
```markdown
|
||||
/refactor into functions
|
||||
```
|
||||
|
||||
This refactoring step might not work for the entire selected source code.
|
||||
|
||||
1. Split the refactoring strategy into functional blocks.
|
||||
For example, iterate on all insert, update, and delete operations in the database.
|
||||
|
||||
1. The next step is to generate tests for the newly created functions. Select the source code again.
|
||||
You can use the code task `/tests` with specific prompt instructions for the test framework:
|
||||
|
||||
```markdown
|
||||
/tests using the CTest test framework
|
||||
```
|
||||
|
||||
1. If your application uses the `Boost.Test` framework instead, refine the prompt:
|
||||
|
||||
```markdown
|
||||
/tests using the Boost.Test framework
|
||||
```
|
||||
|
||||
Resources:
|
||||
|
||||
- [Project with source code](https://gitlab.com/gitlab-da/use-cases/ai/gitlab-duo-coffee-chat/gitlab-duo-coffee-chat-2024-01-09)
|
||||
|
||||
### Refactor C++ functions into object-oriented code
|
||||
|
||||
In this example, existing source code has been wrapped into functions.
|
||||
To support more database types in the future, the code needs to be refactored into classes and object inheritance.
|
||||
|
||||
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
|
||||
Watch these steps in action in [GitLab Duo Coffee Chat: Refactor C++ functions into `OOP` classes](https://www.youtube.com/watch?v=Z9EJh0J9358)
|
||||
<!-- Video published on 2024-01-24 -->
|
||||
|
||||
#### Start working on the class
|
||||
|
||||
- Ask GitLab Duo Chat how to implement an object-oriented pattern for a base database class and inherit it in a SQLite class:
|
||||
|
||||
```markdown
|
||||
Explain a generic database implementation using a base class, and SQLite specific class using C++. Provide source examples and steps to follow.
|
||||
```
|
||||
|
||||
- The learning curve includes asking GitLab Duo Chat about pure virtual functions and virtual function overrides in the implementation class.
|
||||
|
||||
```markdown
|
||||
What is a pure virtual function, and what is required for the developer inheriting from that class?
|
||||
```
|
||||
|
||||
- Code tasks can help refactoring the code. Select the functions in the C++ header file, and use a refined prompt:
|
||||
|
||||
```markdown
|
||||
/refactor into class with public functions, and private path/db attributes. Inherit from the base class DB
|
||||
|
||||
/refactor into a base class with pure virtual functions called DB. Remote the SQLite specific parts.
|
||||
```
|
||||
|
||||
- GitLab Duo Chat also guides with constructor overloading, object initialization, and optimized memory management with shared pointers.
|
||||
|
||||
```markdown
|
||||
How to add a function implementation to a class in a cpp file?
|
||||
|
||||
How to pass values to class attributes through the class constructor call?
|
||||
```
|
||||
|
||||
#### Find better answers
|
||||
|
||||
- The following question did not provide enough context.
|
||||
|
||||
```markdown
|
||||
Should I use virtual override instead of just override?
|
||||
```
|
||||
|
||||
- Instead, try to add more context to get better answers.
|
||||
|
||||
```markdown
|
||||
When implementing a pure virtual function in an inherited class, should I use virtual function override, or just function override? Context is C++.
|
||||
```
|
||||
|
||||
- A relatively complex question involves how to instantiate an object from the newly created class, and call specific functions.
|
||||
|
||||
```markdown
|
||||
How to instantiate an object from a class in C++, call the constructor with the SQLite DB path and call the functions. Prefer pointers.
|
||||
```
|
||||
|
||||
- The result can be helpful, but needed refinements for shared pointers and required source code headers.
|
||||
|
||||
```markdown
|
||||
How to instantiate an object from a class in C++, call the constructor with the SQLite DB path and call the functions. Prefer shared pointers. Explain which header includes are necessary.
|
||||
```
|
||||
|
||||
- Code Suggestions help generate the correct syntax for `std::shared_ptr` pointer arithmetic and help improve the code quality.
|
||||
|
||||
```cpp
|
||||
// Define the SQLite path in a variable, default value database.db
|
||||
|
||||
// Create a shared pointer for the SQLite class
|
||||
|
||||
// Open a database connection using OpenConnection
|
||||
```
|
||||
|
||||
#### Refactor your code
|
||||
|
||||
- After refactoring the source code, compiler errors may occur. Ask Chat to explain them.
|
||||
|
||||
```markdown
|
||||
Explain the error: `db` is a private member of `SQLiteDB`
|
||||
```
|
||||
|
||||
- A specific SQL query string should be refactored into a multi-line string for more efficient editing.
|
||||
|
||||
```cpp
|
||||
std::string sql = "CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, email TEXT NOT NULL)";
|
||||
```
|
||||
|
||||
- Select the source code, and use the `/refactor` code task:
|
||||
|
||||
```markdown
|
||||
/refactor into a stringstream with multiple lines
|
||||
```
|
||||
|
||||
- You can also refactor utility functions into a class with static functions in C++ and then ask Chat how to call them.
|
||||
|
||||
```markdown
|
||||
/refactor into a class providing static functions
|
||||
|
||||
How to call the static functions in the class?
|
||||
```
|
||||
|
||||
After refactoring the source code, the foundation for more database types is built, and overall code quality improved.
|
||||
|
||||
Resources:
|
||||
|
||||
- [Project with source code](https://gitlab.com/gitlab-da/use-cases/ai/gitlab-duo-coffee-chat/gitlab-duo-coffee-chat-2024-01-23)
|
||||
|
||||
## Explain and resolve vulnerabilities
|
||||
|
||||
In this example, detected security vulnerabilities in C should be fixed with the help from GitLab Duo.
|
||||
|
||||
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
|
||||
Watch the [GitLab Duo Coffee Chat: Vulnerability Resolution Challenge #1](https://www.youtube.com/watch?v=Ypwx4lFnHP0)
|
||||
<!-- Video published on 2024-01-30 -->
|
||||
|
||||
[This source code snippet](https://gitlab.com/gitlab-da/use-cases/ai/gitlab-duo-coffee-chat/gitlab-duo-coffee-chat-2024-01-30/-/blob/4685e4e1c658565ae956ad9befdfcc128e60c6cf/src/main-vulnerable-source.c)
|
||||
introduces a security vulnerability with a [buffer overflow](https://en.wikipedia.org/wiki/Buffer_overflow):
|
||||
|
||||
```c
|
||||
strcpy(region, "Hello GitLab Duo Vulnerability Resolution challenge");
|
||||
|
||||
printf("Contents of region: %s\n", region);
|
||||
```
|
||||
|
||||
[SAST security scanners](application_security/sast/analyzers.md) can detect and report the problem. Use [Vulnerability Explanation](application_security/vulnerabilities/index.md#explaining-a-vulnerability) to understand the problem.
|
||||
[Vulnerability resolution](application_security/vulnerabilities/index.md#vulnerability-resolution) helps to generate an MR.
|
||||
If the suggested changes do not fit requirements, or would otherwise lead to problems, you can use [Code Suggestions](project/repository/code_suggestions/index.md) and [Chat](gitlab_duo_chat.md) to refine. For example:
|
||||
|
||||
1. Open VS Code or the Web IDE with GitLab Duo enabled, and add a comment with instructions:
|
||||
|
||||
```c
|
||||
// Avoid potential buffer overflows
|
||||
|
||||
// Possible AI-generated code below
|
||||
strncpy(region, "Hello GitLab Duo Vulnerability Resolution challenge", pagesize);
|
||||
region[pagesize-1] = '\0';
|
||||
printf("Contents of region: %s\n", region);
|
||||
```
|
||||
|
||||
1. Delete the suggested code, and use a different comment to use an alternative method.
|
||||
|
||||
```c
|
||||
// Avoid potential buffer overflows using snprintf()
|
||||
|
||||
// Possible AI-generated code below
|
||||
snprintf(region, pagesize, "Hello GitLab Duo Vulnerability Resolution challenge");
|
||||
|
||||
printf("Contents of region: %s\n", region);
|
||||
```
|
||||
|
||||
1. In addition, use GitLab Duo Chat to ask questions. The `/refactor` code task can generate different suggestions.
|
||||
If you prefer a specific algorithm or function, refine the prompt:
|
||||
|
||||
```markdown
|
||||
/refactor using snprintf
|
||||
```
|
||||
|
||||
Resources:
|
||||
|
||||
- Project with source code: [GitLab Duo Coffee Chat 2024-01-30 - Vulnerability Resolution Challenge](https://gitlab.com/gitlab-da/use-cases/ai/gitlab-duo-coffee-chat/gitlab-duo-coffee-chat-2024-01-30)
|
||||
|
||||
### Answer questions about GitLab
|
||||
|
||||
In this example, the challenge is exploring the GitLab Duo Chat Beta to solve problems.
|
||||
|
||||
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
|
||||
Watch the recording here: [GitLab Duo Coffee Chat: Solve problems with GitLab Duo Chat Beta Challenge](https://www.youtube.com/watch?v=Ypwx4lFnHP0)
|
||||
<!-- Video published on 2024-02-02 -->
|
||||
|
||||
- You can use GitLab Duo Chat to explain CI/CD errors.
|
||||
|
||||
```markdown
|
||||
Explain this CI/CD error: build.sh: line 14: go command not found
|
||||
```
|
||||
|
||||
- What happens when you are impatient, and input just one or two words?
|
||||
|
||||
```markdown
|
||||
labels
|
||||
|
||||
issue labels
|
||||
```
|
||||
|
||||
GitLab Duo Chat asks for more context.
|
||||
|
||||
- Refine your question into a full sentence, describing the problem and asking for a solution.
|
||||
|
||||
```markdown
|
||||
Explain labels in GitLab. Provide an example for efficient usage.
|
||||
```
|
||||
|
||||
Resources:
|
||||
|
||||
- [Project with source code](https://gitlab.com/gitlab-da/use-cases/ai/gitlab-duo-coffee-chat/gitlab-duo-coffee-chat-2024-02-01)
|
||||
|
||||
## Use GitLab Duo to contribute to GitLab
|
||||
|
||||
GitLab Duo usage focuses on contributing to the GitLab codebase, and how customers can contribute more efficiently.
|
||||
|
||||
The GitLab codebase is large, and requires to understand sometimes complex algorithms or application specific implementations.
|
||||
Review the [architecture components](../development/architecture.md) to learn more.
|
||||
|
||||
### Contribute to frontend: Profile Settings
|
||||
|
||||
In this example, the challenge was to update the GitLab profile page and improve the social networks settings.
|
||||
|
||||
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
|
||||
Watch the recording here: [GitLab Duo Coffee Chat: Contribute to GitLab using Code Suggestions and Chat](https://www.youtube.com/watch?v=TauP7soXj-E)
|
||||
<!-- Video published on 2024-02-23 -->
|
||||
|
||||
GitLab Duo Chat can be helpful to explain and refactor code, and generate tests.
|
||||
Code Suggestions help complete existing code, and can generate new functions and algorithms in Ruby, Go, or VueJS.
|
||||
|
||||
1. Use the `/explain` code task to explain selected code sections, and learn how the HAML templates work.
|
||||
1. You can refine the code task prompts, and instead ask `/explain how HAML rendering works`
|
||||
|
||||
Alternatively, you can write in the chat prompt directly, for example:
|
||||
|
||||
```markdown
|
||||
how to populate a select in haml
|
||||
```
|
||||
|
||||
The refactoring examples involve the following:
|
||||
|
||||
1. `/refactor into a HAML dropdown`
|
||||
1. After inspecting the existing UI form code, refine the prompt to `/refactor into a HAML dropdown with a form select`
|
||||
|
||||
GitLab Duo Chat helped with error debugging, prefixing the error message:
|
||||
|
||||
```markdown
|
||||
please explain this error: undefined method `icon` for
|
||||
```
|
||||
|
||||
## Code generation prompts
|
||||
|
||||
The following examples provide helpful [code generation](project/repository/code_suggestions/index.md#best-practices)
|
||||
prompts for the [supported languages](project/repository/code_suggestions/supported_extensions.md) in GitLab Duo.
|
||||
Code generation prompts can be refined using multi-line comments.
|
||||
|
||||
The examples are stored in the [GitLab Duo Prompts project](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-prompts), maintained by the Developer Relations team.
|
||||
|
||||
### C++ code generation prompts
|
||||
|
||||
Create an application to manage distributed file nodes.
|
||||
|
||||
```c++
|
||||
// Create an application to manage distributed file nodes
|
||||
// Provide an overview the health state of nodes
|
||||
// Use OOP patterns to define the base file node
|
||||
// Add specific filesystems inherited from the base file
|
||||
```
|
||||
|
||||
Create an eBPF program which attaches to `XDP` kernel events to measure network traffic.
|
||||
Only works on Linux kernels.
|
||||
|
||||
```c++
|
||||
// Create an eBPF program which attaches to XDP kernel events
|
||||
// Count all packets by IP address
|
||||
// Print a summary
|
||||
// Include necessary headers
|
||||
```
|
||||
|
||||
### `C#` code generation prompts
|
||||
|
||||
Create a medical analyzer app from different sensors, and store the data in `MSSQL`.
|
||||
|
||||
```c#
|
||||
// Create a medical analyzer app
|
||||
// Collect data from different sensors
|
||||
// Store data in MSSQL
|
||||
// Provide methods to access the sensor data
|
||||
```
|
||||
|
||||
### Go code generation prompts
|
||||
|
||||
Create an observability application for Kubernetes which reads and prints the state of containers, pods, and services in the cluster.
|
||||
|
||||
```go
|
||||
// Create a client for Kubernetes observability
|
||||
// Create a function that
|
||||
// Read the kubernetes configuration file from the KUBECONFIG env var
|
||||
// Create kubernetes context, namespace default
|
||||
// Inspect container, pod, service status and print an overview
|
||||
// Import necessary packages
|
||||
// Create main package
|
||||
```
|
||||
|
||||
### Java code generation prompts
|
||||
|
||||
Create a data analytics application, with different data sources for metrics.
|
||||
Provide an API for data queries and aggregation.
|
||||
|
||||
```java
|
||||
// Create a data analytics app
|
||||
// Parse different input sources and their values
|
||||
// Store the metrics in a columnar format
|
||||
// Provide an API to query and aggregate data
|
||||
```
|
||||
|
||||
### JavaScript code generation prompts
|
||||
|
||||
Create a paid-time-off application for employees in ReactJS, with a date-time picker.
|
||||
|
||||
```javascript
|
||||
// Create a Paid Time Off app for users
|
||||
// Create a date-time picker in ReactJS
|
||||
// Provide start and end options
|
||||
// Show public holidays based on the selected country
|
||||
// Send the request to a server API
|
||||
```
|
||||
|
||||
### PHP code generation prompts
|
||||
|
||||
Create an RSS feed fetcher for GitLab releases, allow filtering by title.
|
||||
|
||||
```php
|
||||
// Create a web form to show GitLab releases
|
||||
// Fetch the RSS feed from https://about.gitlab.com/atom.xml
|
||||
// Provide filter options for the title
|
||||
```
|
||||
|
||||
### Python code generation prompts
|
||||
|
||||
Create a webserver using Flask to manage users using the REST API, store them in SQLite.
|
||||
|
||||
```python
|
||||
# Create a Flask webserver
|
||||
# Add REST API entrypoints to manage users by ID
|
||||
# Implement create, update, delete functions
|
||||
# User data needs to be stored in SQlite, create table if not exists
|
||||
# Run the server on port 8080, support TLS
|
||||
# Print required packages for requirements.txt in a comment.
|
||||
# Use Python 3.10 as default
|
||||
```
|
||||
|
||||
### Ruby code generation prompts
|
||||
|
||||
Create a log parser application which stores log data in Elasticsearch.
|
||||
|
||||
```ruby
|
||||
# Create a Ruby app as log parser
|
||||
# Provide hooks to replace sensitive strings in log lines
|
||||
# Format the logs and store them in Elasticsearch
|
||||
```
|
||||
|
||||
### Rust code generation prompts
|
||||
|
||||
Create an RSS feed reader app, example from the blog post [Learn advanced Rust programming with a little help from AI](https://about.gitlab.com/blog/2023/10/12/learn-advanced-rust-programming-with-a-little-help-from-ai-code-suggestions/).
|
||||
|
||||
```rust
|
||||
// Create a function that iterates over the source array
|
||||
// and fetches the data using HTTP from the RSS feed items.
|
||||
// Store the results in a new hash map.
|
||||
// Print the hash map to the terminal.
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
Many of the use cases are available as hands-on recordings in the [GitLab Duo Coffee Chat YouTube playlist](https://www.youtube.com/playlist?list=PL05JrBw4t0Kp5uj_JgQiSvHw1jQu0mSVZ).
|
||||
The [GitLab Duo Coffee Chat](https://handbook.gitlab.com/handbook/marketing/developer-relations/developer-advocacy/projects/#gitlab-duo-coffee-chat) is a learning series maintained by the [Developer Relations team](https://handbook.gitlab.com/handbook/marketing/developer-relations/).
|
||||
|
||||
### Blog resources
|
||||
|
||||
- [Learning Rust with a little help from AI](https://about.gitlab.com/blog/2023/08/10/learning-rust-with-a-little-help-from-ai-code-suggestions-getting-started/)
|
||||
- [Learn advanced Rust programming with a little help from AI](https://about.gitlab.com/blog/2023/10/12/learn-advanced-rust-programming-with-a-little-help-from-ai-code-suggestions/)
|
||||
- [Learning Python with a little help from AI](https://about.gitlab.com/blog/2023/11/09/learning-python-with-a-little-help-from-ai-code-suggestions/)
|
||||
- [Write Terraform plans faster with GitLab Duo Code Suggestions](https://about.gitlab.com/blog/2024/01/24/write-terraform-plans-faster-with-gitlab-duo-code-suggestions/)
|
||||
- [Explore the Dragon Realm: Build a C++ adventure game with a little help from AI](https://about.gitlab.com/blog/2023/08/24/building-a-text-adventure-using-cplusplus-and-code-suggestions/)
|
||||
- [GitLab uses Anthropic for smart, safe AI-assisted code generation](https://about.gitlab.com/blog/2024/01/16/gitlab-uses-anthropic-for-smart-safe-ai-assisted-code-generation/)
|
||||
|
|
@ -425,7 +425,7 @@ create custom stages in addition to those provided in the default template.
|
|||
|
||||
1. On the left sidebar, select **Search or go to** and find your project or group.
|
||||
1. Select **Analyze > Value Stream analytics**.
|
||||
1. Select **Create new Value Stream**.
|
||||
1. Select **New Value Stream**.
|
||||
1. Enter a name for the value stream.
|
||||
1. Select **Create from default template**.
|
||||
1. Customize the default stages:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
**Offering:** GitLab.com, Self-managed
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/22392) in GitLab 12.5.
|
||||
> - [Deprecated](https://gitlab.com/groups/gitlab-org/configure/-/epics/8) in GitLab 14.5.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
**Offering:** GitLab.com, Self-managed
|
||||
|
||||
> - [Deprecated](https://gitlab.com/groups/gitlab-org/configure/-/epics/8) in GitLab 14.5.
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
**Offering:** GitLab.com, Self-managed
|
||||
|
||||
> - [Deprecated](https://gitlab.com/groups/gitlab-org/configure/-/epics/8) in GitLab 14.5.
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
**Offering:** GitLab.com, Self-managed
|
||||
|
||||
> - [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/327908) in GitLab 14.0.
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
**Offering:** GitLab.com, Self-managed
|
||||
|
||||
> - Restricted service account for deployment was [introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/51716) in GitLab 11.5.
|
||||
> - [Deprecated](https://gitlab.com/groups/gitlab-org/configure/-/epics/8) in GitLab 14.5.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
**Offering:** GitLab.com, Self-managed
|
||||
|
||||
> - [Deprecated](https://gitlab.com/groups/gitlab-org/configure/-/epics/8) in GitLab 14.5.
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
**Offering:** GitLab.com, Self-managed
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/22011) in GitLab 11.5.
|
||||
> - Became [optional](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/26565) in GitLab 11.11.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
**Offering:** GitLab.com, Self-managed
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/35954) in GitLab 10.1.
|
||||
> - [Deprecated](https://gitlab.com/groups/gitlab-org/configure/-/epics/8) in GitLab 14.5.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
**Offering:** GitLab.com, Self-managed
|
||||
|
||||
> - Introduced in GitLab 10.3
|
||||
> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/35094) from GitLab Premium to GitLab Free in 13.2.
|
||||
|
|
|
|||
|
|
@ -79,6 +79,10 @@ you might write something like:
|
|||
AI is non-deterministic, so you may not get the same suggestion every time with the same input.
|
||||
To generate quality code, write clear, descriptive, specific tasks.
|
||||
|
||||
### Best practice examples
|
||||
|
||||
For use cases and best practices, follow the [GitLab Duo examples documentation](../../../gitlab_duo_examples.md).
|
||||
|
||||
## Response time
|
||||
|
||||
- Code completion suggestions are usually low latency.
|
||||
|
|
|
|||
|
|
@ -156,12 +156,16 @@ If an SSH key becomes compromised, revoke it. Revoking a key changes both future
|
|||
- Past commits signed by this key are marked as unverified.
|
||||
- Future commits signed by this key are marked as unverified.
|
||||
|
||||
Revoking an SSH key removes it from your account.
|
||||
SSH keys that are only used for authentication do not have the option to be revoked.
|
||||
|
||||
To revoke an SSH key:
|
||||
|
||||
1. On the left sidebar, select your avatar.
|
||||
1. Select **Edit profile**.
|
||||
1. On the left sidebar, select **SSH Keys** (**{key}**).
|
||||
1. Select **Revoke** next to the SSH key you want to delete.
|
||||
1. Next to the SSH key you want to revoke, select **Revoke**.
|
||||
1. Optional. [Delete the SSH key.](../../../ssh.md#delete-an-ssh-key)
|
||||
|
||||
## Related topics
|
||||
|
||||
|
|
|
|||
|
|
@ -204,6 +204,43 @@ You can export a wiki page as a PDF file:
|
|||
|
||||
A PDF of the wiki page is created.
|
||||
|
||||
## Wiki page templates
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/442228) in GitLab 16.10.
|
||||
|
||||
You can create templates to use when creating new pages, or to apply
|
||||
to existing pages. Templates are wiki pages that are stored in the `templates/`
|
||||
directory in the wiki repository.
|
||||
|
||||
### Create a template
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- You must have at least the Developer role.
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find your project or group.
|
||||
1. Select **Plan > Wiki**.
|
||||
1. On the right sidebar, select **Templates**.
|
||||
1. Select **New Template**.
|
||||
1. Enter template title, format and content, as if creating a regular wiki page.
|
||||
|
||||
Templates of a particular format can only be applied to pages of the same format.
|
||||
For example, Markdown templates only apply to Markdown pages.
|
||||
|
||||
### Apply a template
|
||||
|
||||
When you are [creating](#create-a-new-wiki-page) or [editing](#edit-a-wiki-page) a wiki page,
|
||||
you can apply a template.
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- You must have [created](#create-a-template) at least one template already.
|
||||
|
||||
1. In the **Content** section, select the **Choose a template** dropdown list.
|
||||
1. Select a template from the list. If the page already has some content, a warning displays
|
||||
indicating that the existing content will be overridden.
|
||||
1. Select **Apply template**.
|
||||
|
||||
## View history of a wiki page
|
||||
|
||||
The changes of a wiki page over time are recorded in the wiki's Git repository.
|
||||
|
|
|
|||
|
|
@ -406,7 +406,8 @@ on `ssh` command options, see the `man` pages for both `ssh` and `ssh_config`.
|
|||
|
||||
## View your account's SSH keys
|
||||
|
||||
1. Sign in to GitLab.
|
||||
To view the SSH keys for your account:
|
||||
|
||||
1. On the left sidebar, select your avatar.
|
||||
1. Select **Edit profile**.
|
||||
1. On the left sidebar, select **SSH Keys**.
|
||||
|
|
@ -420,7 +421,15 @@ Your existing SSH keys are listed at the bottom of the page. The information inc
|
|||
- Permitted usage types.
|
||||
- The time a key was last used.
|
||||
|
||||
Select **Remove** to permanently delete an SSH key.
|
||||
## Delete an SSH key
|
||||
|
||||
To permanently delete an SSH key:
|
||||
|
||||
1. On the left sidebar, select your avatar.
|
||||
1. Select **Edit profile**.
|
||||
1. On the left sidebar, select **SSH Keys**.
|
||||
1. Next to the key you want to delete, select **Remove** (**{remove}**).
|
||||
1. Select **Delete**.
|
||||
|
||||
## Use different accounts on a single GitLab instance
|
||||
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ module API
|
|||
optional :namespace_aggregation_schedule_lease_duration_in_seconds, type: Integer, desc: 'Maximum duration (in seconds) between refreshes of namespace statistics (Default: 300)'
|
||||
optional :project_jobs_api_rate_limit, type: Integer, desc: 'Maximum authenticated requests to /project/:id/jobs per minute'
|
||||
optional :security_txt_content, type: String, desc: 'Public security contact information made available at https://gitlab.example.com/.well-known/security.txt'
|
||||
optional :downstream_pipeline_trigger_limit_per_project_user_sha, type: Integer, desc: 'Maximum number of downstream pipelines triggered per project'
|
||||
optional :downstream_pipeline_trigger_limit_per_project_user_sha, type: Integer, desc: 'Maximum number of downstream pipelines that can be triggered per minute (for a given project, user, and commit).'
|
||||
|
||||
Gitlab::SSHPublicKey.supported_types.each do |type|
|
||||
optional :"#{type}_key_restriction",
|
||||
|
|
|
|||
|
|
@ -3625,7 +3625,7 @@ msgstr ""
|
|||
msgid "AdminSettings|Limit the amount of namespace and project data to index"
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSettings|Maximum downstream pipelines triggered in a project per user"
|
||||
msgid "AdminSettings|Maximum downstream pipeline trigger rate"
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSettings|Maximum duration of a session for Git operations when 2FA is enabled."
|
||||
|
|
@ -3787,7 +3787,7 @@ msgstr ""
|
|||
msgid "AdminSettings|The latest artifacts for all jobs in the most recent successful pipelines in each project are stored and do not expire."
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSettings|The maximum number of downstream pipelines triggered in a project per user."
|
||||
msgid "AdminSettings|The maximum number of downstream pipelines that can be triggered per minute (for a given project, user, and commit)."
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSettings|The maximum number of included files per pipeline."
|
||||
|
|
@ -6210,6 +6210,9 @@ msgstr ""
|
|||
msgid "Applying"
|
||||
msgstr ""
|
||||
|
||||
msgid "Applying a template will replace the existing content. Any changes you have made will be lost."
|
||||
msgstr ""
|
||||
|
||||
msgid "Applying a template will replace the existing issue description. Any changes you have made will be lost."
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -14446,12 +14449,18 @@ msgstr ""
|
|||
msgid "Could not create wiki page"
|
||||
msgstr ""
|
||||
|
||||
msgid "Could not create wiki template"
|
||||
msgstr ""
|
||||
|
||||
msgid "Could not delete chat nickname %{chat_name}."
|
||||
msgstr ""
|
||||
|
||||
msgid "Could not delete wiki page"
|
||||
msgstr ""
|
||||
|
||||
msgid "Could not delete wiki template"
|
||||
msgstr ""
|
||||
|
||||
msgid "Could not draw the lines for job relationships"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -14506,6 +14515,9 @@ msgstr ""
|
|||
msgid "Could not update wiki page"
|
||||
msgstr ""
|
||||
|
||||
msgid "Could not update wiki template"
|
||||
msgstr ""
|
||||
|
||||
msgid "Could not upload your designs as one or more files uploaded are not supported."
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -14863,9 +14875,6 @@ msgstr ""
|
|||
msgid "CreateValueStreamForm|Create from no template"
|
||||
msgstr ""
|
||||
|
||||
msgid "CreateValueStreamForm|Create new Value Stream"
|
||||
msgstr ""
|
||||
|
||||
msgid "CreateValueStreamForm|Create value stream"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -14908,6 +14917,9 @@ msgstr ""
|
|||
msgid "CreateValueStreamForm|Name is required"
|
||||
msgstr ""
|
||||
|
||||
msgid "CreateValueStreamForm|New Value Stream"
|
||||
msgstr ""
|
||||
|
||||
msgid "CreateValueStreamForm|New stage"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -18742,6 +18754,9 @@ msgstr ""
|
|||
msgid "Edit table"
|
||||
msgstr ""
|
||||
|
||||
msgid "Edit template"
|
||||
msgstr ""
|
||||
|
||||
msgid "Edit this file only."
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -33046,6 +33061,9 @@ msgstr ""
|
|||
msgid "No matching results for \"%{query}\""
|
||||
msgstr ""
|
||||
|
||||
msgid "No matching templates"
|
||||
msgstr ""
|
||||
|
||||
msgid "No matching work item found."
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -44349,6 +44367,9 @@ msgstr ""
|
|||
msgid "Search settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Search templates"
|
||||
msgstr ""
|
||||
|
||||
msgid "Search users"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -49608,6 +49629,9 @@ msgstr ""
|
|||
msgid "Template to append to all Service Desk issues"
|
||||
msgstr ""
|
||||
|
||||
msgid "Template: %{title}"
|
||||
msgstr ""
|
||||
|
||||
msgid "TemplateRepository|Create common files more quickly, and standardize their format."
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -56499,10 +56523,19 @@ msgstr ""
|
|||
msgid "WikiPageConfirmDelete|Are you sure you want to delete this page?"
|
||||
msgstr ""
|
||||
|
||||
msgid "WikiPageConfirmDelete|Are you sure you want to delete this template?"
|
||||
msgstr ""
|
||||
|
||||
msgid "WikiPageConfirmDelete|Delete page"
|
||||
msgstr ""
|
||||
|
||||
msgid "WikiPageConfirmDelete|Delete page %{pageTitle}?"
|
||||
msgid "WikiPageConfirmDelete|Delete page \"%{pageTitle}\"?"
|
||||
msgstr ""
|
||||
|
||||
msgid "WikiPageConfirmDelete|Delete template"
|
||||
msgstr ""
|
||||
|
||||
msgid "WikiPageConfirmDelete|Delete template \"%{pageTitle}\"?"
|
||||
msgstr ""
|
||||
|
||||
msgid "WikiPageConflictMessage|Someone edited the page the same time you did. Please check out %{wikiLinkStart}the page%{wikiLinkEnd} and make sure your changes will not unintentionally remove theirs."
|
||||
|
|
@ -56523,6 +56556,12 @@ msgstr ""
|
|||
msgid "WikiPage|Create page"
|
||||
msgstr ""
|
||||
|
||||
msgid "WikiPage|Create template"
|
||||
msgstr ""
|
||||
|
||||
msgid "WikiPage|Create template %{pageTitle}"
|
||||
msgstr ""
|
||||
|
||||
msgid "WikiPage|Format"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -56535,6 +56574,9 @@ msgstr ""
|
|||
msgid "WikiPage|Save changes"
|
||||
msgstr ""
|
||||
|
||||
msgid "WikiPage|Template title"
|
||||
msgstr ""
|
||||
|
||||
msgid "WikiPage|Tip: You can move this page by adding the path to the beginning of the title."
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -56550,18 +56592,33 @@ msgstr ""
|
|||
msgid "WikiPage|Update %{pageTitle}"
|
||||
msgstr ""
|
||||
|
||||
msgid "WikiPage|Update template %{pageTitle}"
|
||||
msgstr ""
|
||||
|
||||
msgid "WikiPage|Write your content or drag files here…"
|
||||
msgstr ""
|
||||
|
||||
msgid "Wiki|Edit Page"
|
||||
msgstr ""
|
||||
|
||||
msgid "Wiki|Edit Template"
|
||||
msgstr ""
|
||||
|
||||
msgid "Wiki|New Page"
|
||||
msgstr ""
|
||||
|
||||
msgid "Wiki|New Template"
|
||||
msgstr ""
|
||||
|
||||
msgid "Wiki|New page"
|
||||
msgstr ""
|
||||
|
||||
msgid "Wiki|New template"
|
||||
msgstr ""
|
||||
|
||||
msgid "Wiki|No templates found"
|
||||
msgstr ""
|
||||
|
||||
msgid "Wiki|Page history"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -56571,6 +56628,15 @@ msgstr ""
|
|||
msgid "Wiki|Pages"
|
||||
msgstr ""
|
||||
|
||||
msgid "Wiki|Template history"
|
||||
msgstr ""
|
||||
|
||||
msgid "Wiki|Template version"
|
||||
msgstr ""
|
||||
|
||||
msgid "Wiki|Templates"
|
||||
msgstr ""
|
||||
|
||||
msgid "Wiki|The sidebar failed to load. You can reload the page to try again."
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -56580,6 +56646,9 @@ msgstr ""
|
|||
msgid "Wiki|Wiki Pages"
|
||||
msgstr ""
|
||||
|
||||
msgid "Wiki|Wiki Templates"
|
||||
msgstr ""
|
||||
|
||||
msgid "Will be created"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -60635,6 +60704,9 @@ msgstr ""
|
|||
msgid "with %{additions} additions, %{deletions} deletions."
|
||||
msgstr ""
|
||||
|
||||
msgid "with Admin Mode"
|
||||
msgstr ""
|
||||
|
||||
msgid "with expiry changing from %{old_expiry} to %{new_expiry}"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue