Commit 0366826f authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents dfee69f4 fe8576d0
......@@ -5,8 +5,6 @@ module Ci
include BulkInsertSafe
include IgnorableColumns
ignore_columns :build_id_convert_to_bigint, remove_with: '14.1', remove_after: '2021-07-22'
belongs_to :build, class_name: "Ci::Processable", foreign_key: :build_id, inverse_of: :needs
validates :build, presence: true
......
......@@ -6,8 +6,6 @@ module Ci
class BuildRunnerSession < Ci::ApplicationRecord
include IgnorableColumns
ignore_columns :build_id_convert_to_bigint, remove_with: '14.1', remove_after: '2021-07-22'
TERMINAL_SUBPROTOCOL = 'terminal.gitlab.com'
DEFAULT_SERVICE_NAME = 'build'
DEFAULT_PORT_NAME = 'default_port'
......
......@@ -9,8 +9,6 @@ module Ci
include ::Gitlab::OptimisticLocking
include IgnorableColumns
ignore_columns :build_id_convert_to_bigint, remove_with: '14.1', remove_after: '2021-07-22'
belongs_to :build, class_name: "Ci::Build", foreign_key: :build_id
default_value_for :data_store, :redis_trace_chunks
......
......@@ -8,8 +8,6 @@ module Ci
include Presentable
include IgnorableColumns
ignore_column :id_convert_to_bigint, remove_with: '14.2', remove_after: '2021-08-22'
enum status: Ci::HasStatus::STATUSES_ENUM
belongs_to :project
......
......@@ -10,8 +10,6 @@ class Deployment < ApplicationRecord
include FastDestroyAll
include IgnorableColumns
ignore_column :deployable_id_convert_to_bigint, remove_with: '14.2', remove_after: '2021-08-22'
belongs_to :project, required: true
belongs_to :environment, required: true
belongs_to :cluster, class_name: 'Clusters::Cluster', optional: true
......
......@@ -4,7 +4,7 @@ group: Runner
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
# Build Cloud runners for Linux
# Build Cloud runners for Linux **(FREE)**
GitLab Build Cloud runners for Linux run in autoscale mode and are powered by Google Cloud Platform.
......@@ -21,7 +21,7 @@ The `gitlab-shared-runners-manager-X.gitlab.com` fleet of runners are dedicated
Jobs handled by the shared runners on GitLab.com (`shared-runners-manager-X.gitlab.com`),
**time out after 3 hours**, regardless of the timeout configured in a
project. Check the issues [4010](https://gitlab.com/gitlab-com/infrastructure/-/issues/4010) and [4070](https://gitlab.com/gitlab-com/infrastructure/-/issues/4070) for the reference.
project. Check the issues [#4010](https://gitlab.com/gitlab-com/infrastructure/-/issues/4010) and [#4070](https://gitlab.com/gitlab-com/infrastructure/-/issues/4070) for the reference.
Below are the runners' settings.
......
......@@ -4,7 +4,7 @@ group: Runner
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
# VM instances and images for Build Cloud for macOS
# VM instances and images for Build Cloud for macOS **(FREE)**
When you use the Build Cloud for macOS:
......
......@@ -4,7 +4,7 @@ group: Runner
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
# Build Cloud runners for macOS (Beta)
# Build Cloud runners for macOS (Beta) **(FREE SAAS)**
The GitLab Build Cloud for macOS Beta provides on-demand runners integrated with GitLab SaaS [CI/CD](../../../ci/index.md).
Use these runners to build, test, and deploy apps for the Apple ecosystem (macOS, iOS, tvOS). You can take advantage
......
......@@ -4,7 +4,7 @@ group: Runner
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
# Build Cloud runners for Windows (beta)
# Build Cloud runners for Windows (beta) **(FREE)**
GitLab Build Cloud runners for Windows are in [beta](https://about.gitlab.com/handbook/product/gitlab-the-product/#beta)
and shouldn't be used for production workloads.
......
......@@ -17,6 +17,12 @@ in the group and select the **Group** tab.
Every project in the subgroup, but not nested subgroups, can be selected by members
of the group when a new project is created.
- Public projects can be selected by any signed-in user as a template for a new project,
if all enabled [project features](../project/settings/index.md#sharing-and-permissions)
except for **GitLab Pages** and **Security & Compliance** are set to **Everyone With Access**.
The same applies to internal projects.
- Private projects can be selected only by users who are members of the projects.
Repository and database information that is copied over to each new project is identical to the
data exported with the [GitLab Project Import/Export](../project/settings/import_export.md).
......
......@@ -7,8 +7,12 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Requirements Management **(ULTIMATE)**
NOTE:
In 14.4, Requirements was moved under **Issues**.
> - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/2703) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.10.
> - The ability to add and edit a requirement's long description [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/224622) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.5.
> - [Moved under Issues](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70748) in 14.4
With requirements, you can set criteria to check your products against. They can be based on users,
stakeholders, system, software, or anything else you find important to capture.
......@@ -38,7 +42,7 @@ Users with Reporter or higher [permissions](../../permissions.md) can create req
To create a requirement:
1. In a project, go to **Requirements**.
1. In a project, go to **Issues > Requirements**.
1. Select **New requirement**.
1. Enter a title and description and select **Create requirement**.
......@@ -107,7 +111,7 @@ You can search for a requirement from the requirements list page based on the fo
To search for a requirement:
1. In a project, go to **Requirements > List**.
1. In a project, go to **Issues > Requirements > List**.
1. Select the **Search or filter results** field. A dropdown menu appears.
1. Select the requirement author or status from the dropdown or enter plain text to search by requirement title.
1. Press <kbd>Enter</kbd> on your keyboard to filter the list.
......@@ -222,7 +226,7 @@ Before you import your file:
To import requirements:
1. In a project, go to **Requirements**.
1. In a project, go to **Issues > Requirements**.
- If the project already has existing requirements, select the import icon (**{import}**) in the
top right.
- For a project without any requirements, select **Import CSV** in the middle of the page.
......@@ -281,7 +285,7 @@ Users with Reporter or higher [permissions](../../permissions.md) can export req
To export requirements:
1. In a project, go to **Requirements**.
1. In a project, go to **Issues > Requirements**.
1. In the top right, select the **Export as CSV** icon (**{export}**).
A confirmation modal appears.
......
......@@ -7,8 +7,6 @@ module Geo
include BulkInsertSafe
include IgnorableColumns
ignore_column :job_artifact_id_convert_to_bigint, remove_with: '14.2', remove_after: '2021-08-22'
belongs_to :job_artifact, class_name: 'Ci::JobArtifact'
validates :job_artifact, :file_path, presence: true
......
......@@ -12,6 +12,7 @@ module EE
return false unless super
add_item(iterations_menu_item)
add_item(requirements_menu_item)
true
end
......@@ -34,6 +35,20 @@ module EE
item_id: :iterations
)
end
def requirements_menu_item
if !context.project.licensed_feature_available?(:requirements) ||
!can?(context.current_user, :read_requirement, context.project)
return ::Sidebars::NilMenuItem.new(item_id: :requirements)
end
::Sidebars::MenuItem.new(
title: _('Requirements'),
link: project_requirements_management_requirements_path(context.project),
active_routes: { path: 'requirements#index' },
item_id: :requirements
)
end
end
end
end
......
......@@ -13,8 +13,6 @@ module EE
if jira_menu.render?
replace_menu(::Sidebars::Projects::Menus::ExternalIssueTrackerMenu, jira_menu)
end
insert_menu_after(::Sidebars::Projects::Menus::MergeRequestsMenu, ::Sidebars::Projects::Menus::RequirementsMenu.new(context))
end
private
......
# frozen_string_literal: true
module Sidebars
module Projects
module Menus
class RequirementsMenu < ::Sidebars::Menu
override :link
def link
project_requirements_management_requirements_path(context.project)
end
override :render?
def render?
can?(context.current_user, :read_requirement, context.project)
end
override :title
def title
_('Requirements')
end
override :sprite_icon
def sprite_icon
'requirements'
end
override :active_routes
def active_routes
{ path: 'requirements#index' }
end
end
end
end
end
......@@ -80,21 +80,4 @@ RSpec.describe 'Project navbar' do
it_behaves_like 'verified navigation bar'
end
end
context 'when requirements is available' do
before do
stub_licensed_features(requirements: true)
insert_after_nav_item(
_('Merge requests'),
new_nav_item: {
nav_item: _('Requirements'),
nav_sub_items: []
}
)
visit project_path(project)
end
it_behaves_like 'verified navigation bar'
end
end
......@@ -41,7 +41,7 @@ RSpec.describe 'Requirements list', :js do
end
it 'shows the requirements in the navigation sidebar' do
expect(first('.nav-sidebar .active a .nav-item-name')).to have_content('Requirements')
expect(first('.nav-sidebar .active .sidebar-sub-level-items')).to have_content('Requirements')
end
it 'shows requirements tabs for each status type' do
......
......@@ -38,4 +38,36 @@ RSpec.describe Sidebars::Projects::Menus::IssuesMenu do
end
end
end
describe 'Requirements' do
subject { described_class.new(context).renderable_items.any? { |e| e.item_id == :requirements} }
context 'when licensed feature requirements is not enabled' do
it 'does not include requirements menu item' do
stub_licensed_features(requirements: false)
is_expected.to be_falsy
end
end
context 'when licensed feature requirements is enabled' do
before do
stub_licensed_features(requirements: true)
end
context 'when user can read requirements' do
it 'includes requirements menu item' do
is_expected.to be_truthy
end
end
context 'when user cannot read requirements' do
let(:user) { nil }
it 'does not include requirements menu item' do
is_expected.to be_falsy
end
end
end
end
end
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Sidebars::Projects::Menus::RequirementsMenu do
let(:project) { build(:project) }
let(:user) { project.owner }
let(:context) { Sidebars::Projects::Context.new(current_user: user, container: project) }
subject { described_class.new(context) }
before do
stub_licensed_features(requirements: true)
end
describe '#render?' do
context 'when user cannot read requirements' do
let(:user) { nil }
it 'returns false' do
expect(subject.render?).to eq false
end
end
context 'when user can read requirements' do
it 'returns true' do
expect(subject.render?).to eq true
end
it 'does not contain any menu item' do
expect(subject.renderable_items).to be_empty
end
end
end
end
......@@ -57,7 +57,7 @@ function createComponent(options = {}) {
provide: {
portalName: 'fake target',
alignSuggestions: function fakeAlignSuggestions() {},
suggestionsListClass: 'custom-class',
suggestionsListClass: () => 'custom-class',
},
data() {
return { ...data };
......
......@@ -67,7 +67,7 @@ function createComponent({
provide: {
portalName: 'fake target',
alignSuggestions: jest.fn(),
suggestionsListClass: 'custom-class',
suggestionsListClass: () => 'custom-class',
},
stubs,
slots,
......
......@@ -42,7 +42,7 @@ function createComponent(options = {}) {
provide: {
portalName: 'fake target',
alignSuggestions: function fakeAlignSuggestions() {},
suggestionsListClass: 'custom-class',
suggestionsListClass: () => 'custom-class',
},
stubs,
});
......
......@@ -48,7 +48,7 @@ function createComponent(options = {}) {
provide: {
portalName: 'fake target',
alignSuggestions: function fakeAlignSuggestions() {},
suggestionsListClass: 'custom-class',
suggestionsListClass: () => 'custom-class',
},
stubs,
});
......
......@@ -37,7 +37,7 @@ function createComponent(options = {}) {
provide: {
portalName: 'fake target',
alignSuggestions: function fakeAlignSuggestions() {},
suggestionsListClass: 'custom-class',
suggestionsListClass: () => 'custom-class',
},
stubs,
});
......
......@@ -21,7 +21,7 @@ describe('IterationToken', () => {
provide: {
portalName: 'fake target',
alignSuggestions: function fakeAlignSuggestions() {},
suggestionsListClass: 'custom-class',
suggestionsListClass: () => 'custom-class',
},
});
......
......@@ -48,7 +48,7 @@ function createComponent(options = {}) {
provide: {
portalName: 'fake target',
alignSuggestions: function fakeAlignSuggestions() {},
suggestionsListClass: 'custom-class',
suggestionsListClass: () => 'custom-class',
},
stubs,
listeners,
......
......@@ -48,7 +48,7 @@ function createComponent(options = {}) {
provide: {
portalName: 'fake target',
alignSuggestions: function fakeAlignSuggestions() {},
suggestionsListClass: 'custom-class',
suggestionsListClass: () => 'custom-class',
},
stubs,
});
......
......@@ -19,7 +19,7 @@ describe('WeightToken', () => {
provide: {
portalName: 'fake target',
alignSuggestions: function fakeAlignSuggestions() {},
suggestionsListClass: 'custom-class',
suggestionsListClass: () => 'custom-class',
},
});
......
......@@ -974,10 +974,10 @@
resolved "https://registry.yarnpkg.com/@gitlab/tributejs/-/tributejs-1.0.0.tgz#672befa222aeffc83e7d799b0500a7a4418e59b8"
integrity sha512-nmKw1+hB6MHvlmPz63yPwVs1qQkycHwsKgxpEbzmky16Y6mL4EJMk3w1b8QlOAF/AIAzjCERPhe/R4MJiohbZw==
"@gitlab/ui@32.11.1":
version "32.11.1"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-32.11.1.tgz#05b1587cb3df06abdebe9f06d744c5f18c90a0bb"
integrity sha512-LzqEA2aiaqN39qwqNw039Hv9abFsYZJu0RpXikx6/OKCYwVRvynja7oRMwkB2Q+xLOb7YfOoQweWUk1jo6hElw==
"@gitlab/ui@32.11.2":
version "32.11.2"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-32.11.2.tgz#c18456543700b84ec473eccf9871a75d416984cb"
integrity sha512-taJ7aLAt8xG2NB9Rwgve9u+BGn788wgsEe6wjx4crEEWJ3EemXr/zmTe6kzSgo+n/zjZfFBRLl0vjUWCj5ylSQ==
dependencies:
"@babel/standalone" "^7.0.0"
bootstrap-vue "2.18.1"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment