Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
75e959e683
commit
9ce920f62f
27 changed files with 103 additions and 58 deletions
|
@ -110,7 +110,6 @@ linters:
|
|||
- GitlabSecurity/PublicSend
|
||||
- Layout/EmptyLineAfterGuardClause
|
||||
- Layout/LeadingCommentSpace
|
||||
- Layout/SpaceAfterColon
|
||||
- Layout/SpaceAroundOperators
|
||||
- Layout/SpaceBeforeBlockBraces
|
||||
- Layout/SpaceBeforeComma
|
||||
|
|
|
@ -623,20 +623,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
|
|||
- ee/spec/services/dast_scanner_profiles/update_service_spec.rb
|
||||
- ee/spec/services/dast_site_profiles/destroy_service_spec.rb
|
||||
- ee/spec/services/dora/aggregate_metrics_service_spec.rb
|
||||
- ee/spec/services/ee/audit_events/protected_branch_audit_event_service_spec.rb
|
||||
- ee/spec/services/ee/ci/change_variable_service_spec.rb
|
||||
- ee/spec/services/ee/ci/change_variables_service_spec.rb
|
||||
- ee/spec/services/ee/design_management/delete_designs_service_spec.rb
|
||||
- ee/spec/services/ee/git/branch_push_service_spec.rb
|
||||
- ee/spec/services/ee/issuable/bulk_update_service_spec.rb
|
||||
- ee/spec/services/ee/issues/create_service_spec.rb
|
||||
- ee/spec/services/ee/issues/update_service_spec.rb
|
||||
- ee/spec/services/ee/labels/create_service_spec.rb
|
||||
- ee/spec/services/ee/merge_requests/base_service_spec.rb
|
||||
- ee/spec/services/ee/notes/create_service_spec.rb
|
||||
- ee/spec/services/ee/notification_service_spec.rb
|
||||
- ee/spec/services/ee/resource_events/merge_into_notes_service_spec.rb
|
||||
- ee/spec/services/ee/todos/destroy/entity_leave_service_spec.rb
|
||||
- ee/spec/services/external_approval_rules/create_service_spec.rb
|
||||
- ee/spec/services/external_approval_rules/destroy_service_spec.rb
|
||||
- ee/spec/services/external_approval_rules/update_service_spec.rb
|
||||
|
@ -832,9 +818,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
|
|||
- spec/lib/gitlab/alert_management/payload/managed_prometheus_spec.rb
|
||||
- spec/lib/gitlab/alert_management/payload/prometheus_spec.rb
|
||||
- spec/lib/gitlab/alert_management/payload_spec.rb
|
||||
- spec/lib/gitlab/analytics/cycle_analytics/base_query_builder_spec.rb
|
||||
- spec/lib/gitlab/analytics/cycle_analytics/median_spec.rb
|
||||
- spec/lib/gitlab/analytics/cycle_analytics/records_fetcher_spec.rb
|
||||
- spec/lib/gitlab/auth/otp/strategies/devise_spec.rb
|
||||
- spec/lib/gitlab/auth/otp/strategies/forti_authenticator_spec.rb
|
||||
- spec/lib/gitlab/auth/otp/strategies/forti_token_cloud_spec.rb
|
||||
|
|
|
@ -4,7 +4,9 @@ module Types
|
|||
module Ci
|
||||
class PipelineStatusEnum < BaseEnum
|
||||
::Ci::Pipeline.all_state_names.each do |state_symbol|
|
||||
value state_symbol.to_s.upcase, value: state_symbol.to_s
|
||||
value state_symbol.to_s.upcase,
|
||||
description: ::Ci::Pipeline::STATUSES_DESCRIPTION[state_symbol],
|
||||
value: state_symbol.to_s
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -16,6 +16,19 @@ module Ci
|
|||
STATUSES_ENUM = { created: 0, pending: 1, running: 2, success: 3,
|
||||
failed: 4, canceled: 5, skipped: 6, manual: 7,
|
||||
scheduled: 8, preparing: 9, waiting_for_resource: 10 }.freeze
|
||||
STATUSES_DESCRIPTION = {
|
||||
created: 'Pipeline has been created',
|
||||
waiting_for_resource: 'A resource (for example, a runner) that the pipeline requires to run is unavailable',
|
||||
preparing: 'Pipeline is preparing to run',
|
||||
pending: 'Pipeline has not started running yet',
|
||||
running: 'Pipeline is running',
|
||||
failed: 'At least one stage of the pipeline failed',
|
||||
success: 'Pipeline completed successfully',
|
||||
canceled: 'Pipeline was canceled before completion',
|
||||
skipped: 'Pipeline was skipped',
|
||||
manual: 'Pipeline needs to be manually started',
|
||||
scheduled: 'Pipeline is scheduled to run'
|
||||
}.freeze
|
||||
|
||||
UnknownStatusError = Class.new(StandardError)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
- page_title _('Edit'), "#{@runner.description} ##{@runner.id}", 'Runners'
|
||||
- page_title _('Edit'), "#{@runner.description} ##{@runner.id}", _('Runners')
|
||||
|
||||
%h4 Runner ##{@runner.id}
|
||||
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
= f.label :pages_https_only, class: pages_https_only_label_class do
|
||||
%strong
|
||||
= s_('GitLabPages|Force HTTPS (requires valid certificates)')
|
||||
- docs_link_start = "<a href='#{help_page_path('user/project/pages/custom_domains_ssl_tls_certification/index', anchor: 'force-https-for-gitlab-pages-websites')}' target='_blank' rel='noopener noreferrer'>".html_safe
|
||||
- link_end = '</a>'.html_safe
|
||||
%p
|
||||
= s_("GitLabPages|When enabled, all attempts to visit your website through HTTP are automatically redirected to HTTPS using a response with status code 301. Requires a valid certificate for all domains. %{docs_link_start}Learn more.%{link_end}").html_safe % { docs_link_start: docs_link_start, link_end: link_end }
|
||||
|
||||
.gl-mt-3
|
||||
= f.submit s_('GitLabPages|Save'), class: 'btn btn-confirm gl-button'
|
||||
|
|
|
@ -2,6 +2,5 @@
|
|||
= sprite_icon("warning-solid", css_class: "gl-text-orange-600")
|
||||
%strong= _("Warning:")
|
||||
- pages_host = Gitlab.config.pages.host
|
||||
= s_("GitLabPages|When using Pages under the general domain of a GitLab instance (%{pages_host}), you cannot use HTTPS with sub-subdomains. This means that if your username/groupname contains a dot it will not work. This is a limitation of the HTTP Over TLS protocol. HTTP pages will continue to work provided you don't redirect HTTP to HTTPS.").html_safe % { pages_host: pages_host }
|
||||
|
||||
%strong= external_link(s_("GitLabPages|Learn more."), "https://docs.gitlab.com/ee/user/project/pages/introduction.html#limitations")
|
||||
- docs_link_start = "<a href='#{help_page_path('user/project/pages/introduction', anchor: 'limitations')}' target='_blank' rel='noopener noreferrer'>".html_safe
|
||||
= s_("GitLabPages|When using Pages under the general domain of a GitLab instance (%{pages_host}), you cannot use HTTPS with sub-subdomains. This means that if your username/groupname contains a dot it will not work. This is a limitation of the HTTP Over TLS protocol. HTTP pages will continue to work provided you don't redirect HTTP to HTTPS. %{docs_link_start}Learn more.%{link_end}").html_safe % { pages_host: pages_host, docs_link_start: docs_link_start, link_end: link_end }
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
= s_('GitLabPages|Configure pages')
|
||||
.card-body
|
||||
%p.gl-mb-0
|
||||
- docs_link_start = "<a href='#{help_page_path('user/project/pages/index.md')}' target='_blank' rel='noopener noreferrer'>".html_safe
|
||||
- docs_link_start = "<a href='#{help_page_path('user/project/pages/index')}' target='_blank' rel='noopener noreferrer'>".html_safe
|
||||
- samples_link_start = "<a href='https://gitlab.com/pages' target='_blank' rel='noopener noreferrer'>".html_safe
|
||||
- templates_link_start = "<a href='https://gitlab.com/gitlab-org/project-templates' target='_blank' rel='noopener noreferrer'>".html_safe
|
||||
- link_end = '</a>'.html_safe
|
||||
= s_('GitLabPages|See the %{docs_link_start}GitLab Pages documentation%{link_end} to learn how to upload your static site and have GitLab serve it. You can also follow a %{samples_link_start}sample project%{link_end} or use a %{templates_link_start}GitLab CI template%{link_end}.').html_safe % { docs_link_start: docs_link_start, samples_link_start: samples_link_start, templates_link_start: templates_link_start, link_end: link_end }
|
||||
= s_('GitLabPages|Your Pages site is not configured yet. See the %{docs_link_start}GitLab Pages documentation%{link_end} to learn how to upload your static site and have GitLab serve it. You can also take some inspiration from the %{samples_link_start}sample Pages projects%{link_end}.').html_safe % { docs_link_start: docs_link_start, samples_link_start: samples_link_start, link_end: link_end }
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
= s_('GitLabPages|New Domain')
|
||||
|
||||
%p.light
|
||||
= s_('GitLabPages|With GitLab Pages you can host your static websites on GitLab. Combined with the power of GitLab CI and the help of GitLab Runner you can deploy static pages for your individual projects, your user or your group.')
|
||||
- docs_link_start = "<a href='#{help_page_path('user/project/pages/index')}' target='_blank' rel='noopener noreferrer'>".html_safe
|
||||
- link_end = '</a>'.html_safe
|
||||
= s_('GitLabPages|With GitLab Pages you can host your static website directly from your GitLab repository. %{docs_link_start}Learn more.%{link_end}').html_safe % { docs_link_start: docs_link_start, link_end: link_end }
|
||||
|
||||
= render 'pages_settings'
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Review and revise Pages settings-related UI text
|
||||
merge_request: 58479
|
||||
author:
|
||||
type: other
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Add correlation id in X-Request-ID for external pipeline validation
|
||||
merge_request: 58741
|
||||
author:
|
||||
type: other
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Externalise strings in runners/edit.html.haml
|
||||
merge_request: 58315
|
||||
author: nuwe1
|
||||
type: other
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix EmptyLineAfterFinalLetItBe offenses in spec/lib/gitlab/analytics
|
||||
merge_request: 58245
|
||||
author: Huzaifa Iftikhar @huzaifaiftikhar
|
||||
type: fixed
|
5
changelogs/unreleased/tnir-Layout-SpaceAfterColon.yml
Normal file
5
changelogs/unreleased/tnir-Layout-SpaceAfterColon.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Enable Layout/SpaceAfterColon cop for HAML
|
||||
merge_request: 58564
|
||||
author: Takuya Noguchi
|
||||
type: other
|
|
@ -88,3 +88,14 @@ Example response:
|
|||
{ "2021-03-08": 4, "date": "2021-03-08", "value": 4 }
|
||||
]
|
||||
```
|
||||
|
||||
## The `value` field
|
||||
|
||||
For both the project and group-level endpoints above, the `value` field in the
|
||||
API response has a different meaning depending on the provided `metric` query
|
||||
parameter:
|
||||
|
||||
| `metric` query parameter | Description of `value` in response |
|
||||
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `deployment_frequency` | The number of successful deployments during the time period. |
|
||||
| `lead_time_for_changes` | The median number of seconds between the merge of the merge request (MR) and the deployment of the MR's commits for all MRs deployed during the time period. |
|
||||
|
|
|
@ -8021,17 +8021,17 @@ Rotation length unit of an on-call rotation.
|
|||
|
||||
| Value | Description |
|
||||
| ----- | ----------- |
|
||||
| `CANCELED` | |
|
||||
| `CREATED` | |
|
||||
| `FAILED` | |
|
||||
| `MANUAL` | |
|
||||
| `PENDING` | |
|
||||
| `PREPARING` | |
|
||||
| `RUNNING` | |
|
||||
| `SCHEDULED` | |
|
||||
| `SKIPPED` | |
|
||||
| `SUCCESS` | |
|
||||
| `WAITING_FOR_RESOURCE` | |
|
||||
| `CANCELED` | Pipeline was canceled before completion. |
|
||||
| `CREATED` | Pipeline has been created. |
|
||||
| `FAILED` | At least one stage of the pipeline failed. |
|
||||
| `MANUAL` | Pipeline needs to be manually started. |
|
||||
| `PENDING` | Pipeline has not started running yet. |
|
||||
| `PREPARING` | Pipeline is preparing to run. |
|
||||
| `RUNNING` | Pipeline is running. |
|
||||
| `SCHEDULED` | Pipeline is scheduled to run. |
|
||||
| `SKIPPED` | Pipeline was skipped. |
|
||||
| `SUCCESS` | Pipeline completed successfully. |
|
||||
| `WAITING_FOR_RESOURCE` | A resource (for example, a runner) that the pipeline requires to run is unavailable. |
|
||||
|
||||
### `ProjectMemberRelation`
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ To enable merge trains:
|
|||
|
||||
- You must have maintainer [permissions](../../../../user/permissions.md).
|
||||
- You must be using [GitLab Runner](https://gitlab.com/gitlab-org/gitlab-runner) 11.9 or later.
|
||||
- In GitLab 12.0 and later, you need [Redis](https://redis.io/) 3.2 or later.
|
||||
- In GitLab 13.0 and later, you need [Redis](https://redis.io/) 5.0 or later.
|
||||
- Your repository must be a GitLab repository, not an
|
||||
[external repository](../../../ci_cd_for_external_repos/index.md).
|
||||
|
||||
|
|
|
@ -94,8 +94,8 @@ from source at the [Node.js website](https://nodejs.org/en/download/).
|
|||
|
||||
GitLab 13.0 and later requires Redis version 4.0 or higher.
|
||||
|
||||
Redis version 5.0 or higher is recommended, as this is what ships with
|
||||
[Omnibus GitLab](https://docs.gitlab.com/omnibus/) packages starting with GitLab 12.7.
|
||||
Redis version 6.0 or higher is recommended, as this is what ships with
|
||||
[Omnibus GitLab](https://docs.gitlab.com/omnibus/) packages starting with GitLab 13.9.
|
||||
|
||||
## Hardware requirements
|
||||
|
||||
|
|
|
@ -69,8 +69,10 @@ module Gitlab
|
|||
end
|
||||
|
||||
def validate_service_request
|
||||
headers = {}
|
||||
headers['X-Gitlab-Token'] = validation_service_token if validation_service_token
|
||||
headers = {
|
||||
'X-Request-ID' => Labkit::Correlation::CorrelationId.current_id,
|
||||
'X-Gitlab-Token' => validation_service_token
|
||||
}.compact
|
||||
|
||||
Gitlab::HTTP.post(
|
||||
validation_service_url, timeout: validation_service_timeout,
|
||||
|
|
|
@ -14531,9 +14531,6 @@ msgstr ""
|
|||
msgid "GitLabPages|It may take up to 30 minutes before the site is available after the first deployment."
|
||||
msgstr ""
|
||||
|
||||
msgid "GitLabPages|Learn more."
|
||||
msgstr ""
|
||||
|
||||
msgid "GitLabPages|Maximum size of pages (MB)"
|
||||
msgstr ""
|
||||
|
||||
|
@ -14558,9 +14555,6 @@ msgstr ""
|
|||
msgid "GitLabPages|Save"
|
||||
msgstr ""
|
||||
|
||||
msgid "GitLabPages|See the %{docs_link_start}GitLab Pages documentation%{link_end} to learn how to upload your static site and have GitLab serve it. You can also follow a %{samples_link_start}sample project%{link_end} or use a %{templates_link_start}GitLab CI template%{link_end}."
|
||||
msgstr ""
|
||||
|
||||
msgid "GitLabPages|Something went wrong while obtaining the Let's Encrypt certificate for %{domain}. To retry visit your %{link_start}domain details%{link_end}."
|
||||
msgstr ""
|
||||
|
||||
|
@ -14576,10 +14570,16 @@ msgstr ""
|
|||
msgid "GitLabPages|Verified"
|
||||
msgstr ""
|
||||
|
||||
msgid "GitLabPages|When using Pages under the general domain of a GitLab instance (%{pages_host}), you cannot use HTTPS with sub-subdomains. This means that if your username/groupname contains a dot it will not work. This is a limitation of the HTTP Over TLS protocol. HTTP pages will continue to work provided you don't redirect HTTP to HTTPS."
|
||||
msgid "GitLabPages|When enabled, all attempts to visit your website through HTTP are automatically redirected to HTTPS using a response with status code 301. Requires a valid certificate for all domains. %{docs_link_start}Learn more.%{link_end}"
|
||||
msgstr ""
|
||||
|
||||
msgid "GitLabPages|With GitLab Pages you can host your static websites on GitLab. Combined with the power of GitLab CI and the help of GitLab Runner you can deploy static pages for your individual projects, your user or your group."
|
||||
msgid "GitLabPages|When using Pages under the general domain of a GitLab instance (%{pages_host}), you cannot use HTTPS with sub-subdomains. This means that if your username/groupname contains a dot it will not work. This is a limitation of the HTTP Over TLS protocol. HTTP pages will continue to work provided you don't redirect HTTP to HTTPS. %{docs_link_start}Learn more.%{link_end}"
|
||||
msgstr ""
|
||||
|
||||
msgid "GitLabPages|With GitLab Pages you can host your static website directly from your GitLab repository. %{docs_link_start}Learn more.%{link_end}"
|
||||
msgstr ""
|
||||
|
||||
msgid "GitLabPages|Your Pages site is not configured yet. See the %{docs_link_start}GitLab Pages documentation%{link_end} to learn how to upload your static site and have GitLab serve it. You can also take some inspiration from the %{samples_link_start}sample Pages projects%{link_end}."
|
||||
msgstr ""
|
||||
|
||||
msgid "GitLabPages|Your pages are served under:"
|
||||
|
@ -23525,6 +23525,9 @@ msgstr ""
|
|||
msgid "Prevent adding new members to project membership within this group"
|
||||
msgstr ""
|
||||
|
||||
msgid "Prevent approval of merge requests by merge request committers."
|
||||
msgstr ""
|
||||
|
||||
msgid "Prevent environment from auto-stopping"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -175,7 +175,6 @@ RSpec.describe 'Pages edits pages settings', :js do
|
|||
|
||||
expect(page).not_to have_field(:project_pages_https_only)
|
||||
expect(page).not_to have_content('Force HTTPS (requires valid certificates)')
|
||||
expect(page).to have_button('Save')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -73,6 +73,6 @@ RSpec.describe 'User searches project settings', :js do
|
|||
visit project_pages_path(project)
|
||||
end
|
||||
|
||||
it_behaves_like 'can highlight results', 'static websites'
|
||||
it_behaves_like 'can highlight results', 'static website'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,6 +7,7 @@ RSpec.describe Gitlab::Analytics::CycleAnalytics::BaseQueryBuilder do
|
|||
let_it_be(:mr1) { create(:merge_request, target_project: project, source_project: project, allow_broken: true, created_at: 3.months.ago) }
|
||||
let_it_be(:mr2) { create(:merge_request, target_project: project, source_project: project, allow_broken: true, created_at: 1.month.ago) }
|
||||
let_it_be(:user) { create(:user) }
|
||||
|
||||
let(:params) { { current_user: user } }
|
||||
let(:records) do
|
||||
stage = build(:cycle_analytics_project_stage, {
|
||||
|
|
|
@ -4,6 +4,7 @@ require 'spec_helper'
|
|||
|
||||
RSpec.describe Gitlab::Analytics::CycleAnalytics::Median do
|
||||
let_it_be(:project) { create(:project, :repository) }
|
||||
|
||||
let(:query) { Project.joins(merge_requests: :metrics) }
|
||||
|
||||
let(:stage) do
|
||||
|
|
|
@ -34,6 +34,7 @@ RSpec.describe Gitlab::Analytics::CycleAnalytics::RecordsFetcher do
|
|||
describe 'for issue based stage' do
|
||||
let_it_be(:issue1) { create(:issue, project: project) }
|
||||
let_it_be(:issue2) { create(:issue, project: project, confidential: true) }
|
||||
|
||||
let(:stage) do
|
||||
build(:cycle_analytics_project_stage, {
|
||||
start_event_identifier: :plan_stage_start,
|
||||
|
|
|
@ -57,13 +57,14 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Validate::External do
|
|||
before do
|
||||
stub_env('EXTERNAL_VALIDATION_SERVICE_URL', validation_service_url)
|
||||
allow(Gitlab).to receive(:com?).and_return(dot_com)
|
||||
allow(Labkit::Correlation::CorrelationId).to receive(:current_id).and_return('correlation-id')
|
||||
end
|
||||
|
||||
it 'respects the defined payload schema' do
|
||||
expect(::Gitlab::HTTP).to receive(:post) do |_url, params|
|
||||
expect(params[:body]).to match_schema('/external_validation')
|
||||
expect(params[:timeout]).to eq(described_class::DEFAULT_VALIDATION_REQUEST_TIMEOUT)
|
||||
expect(params[:headers]).to eq({})
|
||||
expect(params[:headers]).to eq({ 'X-Request-ID' => 'correlation-id' })
|
||||
end
|
||||
|
||||
perform!
|
||||
|
@ -127,7 +128,7 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Validate::External do
|
|||
|
||||
it 'passes token in X-Gitlab-Token header' do
|
||||
expect(::Gitlab::HTTP).to receive(:post) do |_url, params|
|
||||
expect(params[:headers]).to eq({ 'X-Gitlab-Token' => '123' })
|
||||
expect(params[:headers]).to include({ 'X-Gitlab-Token' => '123' })
|
||||
end
|
||||
|
||||
perform!
|
||||
|
|
|
@ -10457,7 +10457,7 @@ schema-utils@^1.0.0:
|
|||
ajv-errors "^1.0.0"
|
||||
ajv-keywords "^3.1.0"
|
||||
|
||||
schema-utils@^2.0.0, schema-utils@^2.5.0, schema-utils@^2.6.5, schema-utils@^2.7.0:
|
||||
schema-utils@^2.0.0, schema-utils@^2.6.5, schema-utils@^2.7.0:
|
||||
version "2.7.1"
|
||||
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7"
|
||||
integrity sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==
|
||||
|
|
Loading…
Reference in a new issue