Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab/ci/review.gitlab-ci.yml2
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock4
-rw-r--r--app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js2
-rw-r--r--app/assets/javascripts/pages/projects/settings/repository/form.js2
-rw-r--r--app/controllers/admin/application_settings_controller.rb2
-rw-r--r--app/controllers/projects/deploy_keys_controller.rb17
-rw-r--r--app/controllers/projects/settings/ci_cd_controller.rb5
-rw-r--r--app/controllers/projects/settings/repository_controller.rb2
-rw-r--r--app/models/ci/bridge.rb5
-rw-r--r--app/models/namespace.rb2
-rw-r--r--app/services/ci/create_cross_project_pipeline_service.rb6
-rw-r--r--app/services/ci/create_pipeline_service.rb1
-rw-r--r--app/views/projects/settings/ci_cd/show.html.haml2
-rw-r--r--app/views/projects/settings/repository/show.html.haml2
-rw-r--r--changelogs/unreleased/13005-allow-to-use-issue-issues-and-merge_request-merge_requests-for-issu.yml5
-rw-r--r--changelogs/unreleased/199370-move-deploy_keys-to-cicd.yml5
-rw-r--r--changelogs/unreleased/dz-scope-issue-route-default.yml5
-rw-r--r--config/routes/project.rb8
-rw-r--r--doc/development/fe_guide/dependencies.md40
-rw-r--r--doc/development/fe_guide/index.md44
-rw-r--r--doc/ssh/README.md4
-rw-r--r--doc/user/project/pipelines/settings.md8
-rw-r--r--doc/user/project/repository/web_editor.md25
-rw-r--r--doc/user/project/settings/index.md10
-rw-r--r--lib/banzai/filter/inline_embeds_filter.rb18
-rw-r--r--lib/banzai/filter/inline_grafana_metrics_filter.rb6
-rw-r--r--lib/banzai/filter/inline_metrics_filter.rb10
-rw-r--r--lib/gitlab/ci/pipeline/chain/build/associations.rb28
-rw-r--r--locale/gitlab.pot3
-rw-r--r--package.json2
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb5
-rw-r--r--spec/controllers/projects/deploy_keys_controller_spec.rb16
-rw-r--r--spec/features/projects/deploy_keys_spec.rb4
-rw-r--r--spec/features/projects/settings/ci_cd_settings_spec.rb96
-rw-r--r--spec/features/projects/settings/repository_settings_spec.rb83
-rw-r--r--spec/features/projects/settings/user_interacts_with_deploy_keys_spec.rb4
-rw-r--r--spec/helpers/award_emoji_helper_spec.rb2
-rw-r--r--spec/helpers/boards_helper_spec.rb2
-rw-r--r--spec/helpers/events_helper_spec.rb2
-rw-r--r--spec/helpers/issuables_helper_spec.rb4
-rw-r--r--spec/helpers/issues_helper_spec.rb2
-rw-r--r--spec/helpers/labels_helper_spec.rb14
-rw-r--r--spec/helpers/notes_helper_spec.rb2
-rw-r--r--spec/javascripts/diffs/mock_data/diff_discussions.js12
-rw-r--r--spec/javascripts/issue_show/components/app_spec.js14
-rw-r--r--spec/javascripts/vue_mr_widget/mock_data.js2
-rw-r--r--spec/lib/gitlab/ci/pipeline/chain/build/associations_spec.rb62
-rw-r--r--spec/lib/gitlab/url_builder_spec.rb4
-rw-r--r--spec/models/project_services/gitlab_issue_tracker_service_spec.rb12
-rw-r--r--spec/presenters/issue_presenter_spec.rb4
-rw-r--r--spec/presenters/merge_request_presenter_spec.rb10
-rw-r--r--spec/requests/api/releases_spec.rb2
-rw-r--r--spec/services/ci/create_cross_project_pipeline_service_spec.rb35
-rw-r--r--spec/services/ci/create_pipeline_service/custom_config_content_spec.rb18
-rw-r--r--spec/services/error_tracking/issue_details_service_spec.rb2
-rw-r--r--spec/views/admin/application_settings/integrations.html.haml_spec.rb1
-rw-r--r--yarn.lock8
58 files changed, 452 insertions, 247 deletions
diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml
index 678be464dfe..d50f6171314 100644
--- a/.gitlab/ci/review.gitlab-ci.yml
+++ b/.gitlab/ci/review.gitlab-ci.yml
@@ -69,7 +69,7 @@ review-build-cng:
variables:
HOST_SUFFIX: "${CI_ENVIRONMENT_SLUG}"
DOMAIN: "-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}"
- GITLAB_HELM_CHART_REF: "v2.5.1"
+ GITLAB_HELM_CHART_REF: "v2.6.8"
GITLAB_EDITION: "ce"
environment:
name: review/${CI_COMMIT_REF_NAME}
diff --git a/Gemfile b/Gemfile
index 16e4ef12fe0..49ced7022e2 100644
--- a/Gemfile
+++ b/Gemfile
@@ -383,7 +383,7 @@ group :development, :test do
gem 'simple_po_parser', '~> 1.1.2', require: false
- gem 'timecop', '~> 0.8.0'
+ gem 'timecop', '~> 0.9.1'
gem 'png_quantizator', '~> 0.2.1', require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index b11f0c5a5db..8653375281b 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1065,7 +1065,7 @@ GEM
thread_safe (0.3.6)
thrift (0.11.0.0)
tilt (2.0.10)
- timecop (0.8.1)
+ timecop (0.9.1)
timfel-krb5-auth (0.8.3)
toml (0.2.0)
parslet (~> 1.8.0)
@@ -1387,7 +1387,7 @@ DEPENDENCIES
sys-filesystem (~> 1.1.6)
test-prof (~> 0.10.0)
thin (~> 1.7.0)
- timecop (~> 0.8.0)
+ timecop (~> 0.9.1)
toml-rb (~> 1.0.0)
truncato (~> 0.7.11)
u2f (~> 0.2.1)
diff --git a/app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js b/app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
index c83e2bdbf38..7f865f4cfb6 100644
--- a/app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
+++ b/app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
@@ -4,6 +4,7 @@ import AjaxVariableList from '~/ci_variable_list/ajax_variable_list';
import registrySettingsApp from '~/registry/settings/registry_settings_bundle';
import initVariableList from '~/ci_variable_list';
import DueDateSelectors from '~/due_date_select';
+import initDeployKeys from '~/deploy_keys';
document.addEventListener('DOMContentLoaded', () => {
// Initialize expandable settings panels
@@ -44,4 +45,5 @@ document.addEventListener('DOMContentLoaded', () => {
new DueDateSelectors();
registrySettingsApp();
+ initDeployKeys();
});
diff --git a/app/assets/javascripts/pages/projects/settings/repository/form.js b/app/assets/javascripts/pages/projects/settings/repository/form.js
index 3e02893f24c..fa6d17f0729 100644
--- a/app/assets/javascripts/pages/projects/settings/repository/form.js
+++ b/app/assets/javascripts/pages/projects/settings/repository/form.js
@@ -3,7 +3,6 @@
import ProtectedTagCreate from '~/protected_tags/protected_tag_create';
import ProtectedTagEditList from '~/protected_tags/protected_tag_edit_list';
import initSettingsPanels from '~/settings_panels';
-import initDeployKeys from '~/deploy_keys';
import ProtectedBranchCreate from '~/protected_branches/protected_branch_create';
import ProtectedBranchEditList from '~/protected_branches/protected_branch_edit_list';
import DueDateSelectors from '~/due_date_select';
@@ -12,7 +11,6 @@ import fileUpload from '~/lib/utils/file_upload';
export default () => {
new ProtectedTagCreate();
new ProtectedTagEditList();
- initDeployKeys();
initSettingsPanels();
new ProtectedBranchCreate();
new ProtectedBranchEditList();
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb
index 54c9bde067d..2192bcc96ee 100644
--- a/app/controllers/admin/application_settings_controller.rb
+++ b/app/controllers/admin/application_settings_controller.rb
@@ -244,6 +244,8 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
def render_update_error
action = valid_setting_panels.include?(action_name) ? action_name : :general
+ flash[:alert] = _('Application settings update failed')
+
render action
end
diff --git a/app/controllers/projects/deploy_keys_controller.rb b/app/controllers/projects/deploy_keys_controller.rb
index f13fb4d0b3d..f43e9f2bd19 100644
--- a/app/controllers/projects/deploy_keys_controller.rb
+++ b/app/controllers/projects/deploy_keys_controller.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: true
class Projects::DeployKeysController < Projects::ApplicationController
- include RepositorySettingsRedirect
respond_to :html
# Authorize
@@ -12,7 +11,7 @@ class Projects::DeployKeysController < Projects::ApplicationController
def index
respond_to do |format|
- format.html { redirect_to_repository_settings(@project, anchor: 'js-deploy-keys-settings') }
+ format.html { redirect_to_ci_cd_settings }
format.json do
render json: Projects::Settings::DeployKeysPresenter.new(@project, current_user: current_user).as_json
end
@@ -20,7 +19,7 @@ class Projects::DeployKeysController < Projects::ApplicationController
end
def new
- redirect_to_repository_settings(@project, anchor: 'js-deploy-keys-settings')
+ redirect_to_ci_cd_settings
end
def create
@@ -30,7 +29,7 @@ class Projects::DeployKeysController < Projects::ApplicationController
flash[:alert] = @key.errors.full_messages.join(', ').html_safe
end
- redirect_to_repository_settings(@project, anchor: 'js-deploy-keys-settings')
+ redirect_to_ci_cd_settings
end
def edit
@@ -39,7 +38,7 @@ class Projects::DeployKeysController < Projects::ApplicationController
def update
if deploy_key.update(update_params)
flash[:notice] = _('Deploy key was successfully updated.')
- redirect_to_repository_settings(@project, anchor: 'js-deploy-keys-settings')
+ redirect_to_ci_cd_settings
else
render 'edit'
end
@@ -51,7 +50,7 @@ class Projects::DeployKeysController < Projects::ApplicationController
return render_404 unless key
respond_to do |format|
- format.html { redirect_to_repository_settings(@project, anchor: 'js-deploy-keys-settings') }
+ format.html { redirect_to_ci_cd_settings }
format.json { head :ok }
end
end
@@ -62,7 +61,7 @@ class Projects::DeployKeysController < Projects::ApplicationController
return render_404 unless deploy_key_project
respond_to do |format|
- format.html { redirect_to_repository_settings(@project, anchor: 'js-deploy-keys-settings') }
+ format.html { redirect_to_ci_cd_settings }
format.json { head :ok }
end
end
@@ -97,4 +96,8 @@ class Projects::DeployKeysController < Projects::ApplicationController
access_denied!
end
end
+
+ def redirect_to_ci_cd_settings
+ redirect_to project_settings_ci_cd_path(@project, anchor: 'js-deploy-keys-settings')
+ end
end
diff --git a/app/controllers/projects/settings/ci_cd_controller.rb b/app/controllers/projects/settings/ci_cd_controller.rb
index ed42fb55223..c4cc1adcd4e 100644
--- a/app/controllers/projects/settings/ci_cd_controller.rb
+++ b/app/controllers/projects/settings/ci_cd_controller.rb
@@ -101,6 +101,7 @@ module Projects
define_triggers_variables
define_badges_variables
define_auto_devops_variables
+ define_deploy_keys
end
def define_runners_variables
@@ -153,6 +154,10 @@ module Projects
@new_deploy_token = DeployToken.new
end
+
+ def define_deploy_keys
+ @deploy_keys = DeployKeysPresenter.new(@project, current_user: current_user)
+ end
end
end
end
diff --git a/app/controllers/projects/settings/repository_controller.rb b/app/controllers/projects/settings/repository_controller.rb
index 28db3024dc4..a1f88c73649 100644
--- a/app/controllers/projects/settings/repository_controller.rb
+++ b/app/controllers/projects/settings/repository_controller.rb
@@ -27,8 +27,6 @@ module Projects
private
def render_show
- @deploy_keys = DeployKeysPresenter.new(@project, current_user: current_user)
-
define_protected_refs
remote_mirror
diff --git a/app/models/ci/bridge.rb b/app/models/ci/bridge.rb
index 26997d17816..39be26abc1d 100644
--- a/app/models/ci/bridge.rb
+++ b/app/models/ci/bridge.rb
@@ -167,7 +167,10 @@ module Ci
target_revision: {
ref: target_ref || downstream_project.default_branch
},
- execute_params: { ignore_skip_ci: true }
+ execute_params: {
+ ignore_skip_ci: true,
+ bridge: self
+ }
}
end
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index f06e9da3b2a..fbc010c6b7c 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -130,7 +130,7 @@ class Namespace < ApplicationRecord
return unless host.ends_with?(gitlab_host)
name = host.delete_suffix(gitlab_host)
- Namespace.find_by_full_path(name)
+ Namespace.find_by_path(name)
end
# overridden in ee
diff --git a/app/services/ci/create_cross_project_pipeline_service.rb b/app/services/ci/create_cross_project_pipeline_service.rb
index 8de72ace261..22b8e37a7e8 100644
--- a/app/services/ci/create_cross_project_pipeline_service.rb
+++ b/app/services/ci/create_cross_project_pipeline_service.rb
@@ -20,12 +20,6 @@ module Ci
service.execute(
pipeline_params.fetch(:source), pipeline_params[:execute_params]) do |pipeline|
- @bridge.sourced_pipelines.build(
- source_pipeline: @bridge.pipeline,
- source_project: @bridge.project,
- project: @bridge.downstream_project,
- pipeline: pipeline)
-
pipeline.variables.build(@bridge.downstream_variables)
end
end
diff --git a/app/services/ci/create_pipeline_service.rb b/app/services/ci/create_pipeline_service.rb
index 52977034b70..347630f865f 100644
--- a/app/services/ci/create_pipeline_service.rb
+++ b/app/services/ci/create_pipeline_service.rb
@@ -7,6 +7,7 @@ module Ci
CreateError = Class.new(StandardError)
SEQUENCE = [Gitlab::Ci::Pipeline::Chain::Build,
+ Gitlab::Ci::Pipeline::Chain::Build::Associations,
Gitlab::Ci::Pipeline::Chain::Validate::Abilities,
Gitlab::Ci::Pipeline::Chain::Validate::Repository,
Gitlab::Ci::Pipeline::Chain::Config::Content,
diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml
index 9e47e380266..ab2f64cdc21 100644
--- a/app/views/projects/settings/ci_cd/show.html.haml
+++ b/app/views/projects/settings/ci_cd/show.html.haml
@@ -54,6 +54,8 @@
= render "shared/deploy_tokens/index", group_or_project: @project, description: deploy_token_description
+= render @deploy_keys
+
%section.settings.no-animate#js-pipeline-triggers{ class: ('expanded' if expanded) }
.settings-header
%h4
diff --git a/app/views/projects/settings/repository/show.html.haml b/app/views/projects/settings/repository/show.html.haml
index 3d1eb85da0d..5bf92d32474 100644
--- a/app/views/projects/settings/repository/show.html.haml
+++ b/app/views/projects/settings/repository/show.html.haml
@@ -11,8 +11,6 @@
-# Those are used throughout the actual views. These `shared` views are then
-# reused in EE.
= render "projects/settings/repository/protected_branches"
-
-= render @deploy_keys
= render "projects/cleanup/show"
= render_if_exists 'shared/promotions/promote_repository_features'
diff --git a/changelogs/unreleased/13005-allow-to-use-issue-issues-and-merge_request-merge_requests-for-issu.yml b/changelogs/unreleased/13005-allow-to-use-issue-issues-and-merge_request-merge_requests-for-issu.yml
new file mode 100644
index 00000000000..658a27723ea
--- /dev/null
+++ b/changelogs/unreleased/13005-allow-to-use-issue-issues-and-merge_request-merge_requests-for-issu.yml
@@ -0,0 +1,5 @@
+---
+title: Allow issues/merge_requests as an issuable_type in Insights configuration
+merge_request: 26061
+author:
+type: added
diff --git a/changelogs/unreleased/199370-move-deploy_keys-to-cicd.yml b/changelogs/unreleased/199370-move-deploy_keys-to-cicd.yml
new file mode 100644
index 00000000000..04d07bbc550
--- /dev/null
+++ b/changelogs/unreleased/199370-move-deploy_keys-to-cicd.yml
@@ -0,0 +1,5 @@
+---
+title: Moved Deploy Keys from Repository to CI/CD settings.
+merge_request: 25444
+author:
+type: changed
diff --git a/changelogs/unreleased/dz-scope-issue-route-default.yml b/changelogs/unreleased/dz-scope-issue-route-default.yml
new file mode 100644
index 00000000000..d39c70ef620
--- /dev/null
+++ b/changelogs/unreleased/dz-scope-issue-route-default.yml
@@ -0,0 +1,5 @@
+---
+title: Move issues routes under /-/ scope
+merge_request: 24791
+author:
+type: changed
diff --git a/config/routes/project.rb b/config/routes/project.rb
index cff075b260f..72dda11435c 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -279,6 +279,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end
end
+ draw :issues
draw :merge_requests
# The wiki and repository routing contains wildcard characters so
@@ -401,12 +402,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
# Unscoped route. It will be replaced with redirect to /-/issues/
# Issue https://gitlab.com/gitlab-org/gitlab/issues/118849
- draw :issues
-
- # To ensure an old unscoped routing is used for the UI we need to
- # add prefix 'as' to the scope routing and place it below original routing.
- # Issue https://gitlab.com/gitlab-org/gitlab/issues/118849
- scope '-', as: 'scoped' do
+ scope as: 'deprecated' do
draw :issues
end
diff --git a/doc/development/fe_guide/dependencies.md b/doc/development/fe_guide/dependencies.md
new file mode 100644
index 00000000000..0f5825992e9
--- /dev/null
+++ b/doc/development/fe_guide/dependencies.md
@@ -0,0 +1,40 @@
+# Frontend dependencies
+
+## Package manager
+
+We use [Yarn](https://yarnpkg.com/) to manage frontend dependencies. There are a few exceptions:
+
+- [FontAwesome](https://fontawesome.com/), installed via the `font-awesome-rails` gem: we are working to replace it with
+ [GitLab SVGs](https://gitlab-org.gitlab.io/gitlab-svgs/) icons library.
+- [ACE](https://ace.c9.io/) editor, installed via the `ace-rails-ap` gem.
+- Other dependencies found under `vendor/assets/`.
+
+## Updating dependencies
+
+### Renovate GitLab Bot
+
+We use the [Renovate GitLab Bot](https://gitlab.com/gitlab-org/frontend/renovate-gitlab-bot) to
+automatically create merge requests for updating dependencies of several projects. You can find the
+up-to-date list of projects managed by the renovate bot in the project’s README. Some key dependencies
+updated using renovate are:
+
+- [`@gitlab/ui`](https://gitlab.com/gitlab-org/gitlab-ui/)
+- [`@gitlab/svgs`](https://gitlab.com/gitlab-org/gitlab-svgs/)
+- [`@gitlab/eslint-config`](https://gitlab.com/gitlab-org/gitlab-eslint-config)
+
+### Blocked dependencies
+
+We discourage installing some dependencies in [GitLab repository](https://gitlab.com/gitlab-org/gitlab)
+because they can create conflicts in the dependency tree. Blocked dependencies are declared in the
+`blockDependencies` property of GitLab’s [`package.json` file](https://gitlab.com/gitlab-org/gitlab/-/blob/master/package.json).
+
+## Dependency notes
+
+### BootstrapVue
+
+[BootstrapVue](https://bootstrap-vue.js.org/) is a component library built with Vue.js and Bootstrap.
+We wrap BootstrapVue components in [GitLab UI](https://gitlab.com/gitlab-org/gitlab-ui/) with the
+purpose of applying visual styles and usage guidelines specified in the
+[Pajamas Design System](https://design.gitlab.com/). For this reason, we recommend not installing
+BootstrapVue directly in the GitLab repository. Instead create a wrapper of the BootstrapVue
+component you want to use in GitLab UI first.
diff --git a/doc/development/fe_guide/index.md b/doc/development/fe_guide/index.md
index ba77a51a089..ff69cb0e0ce 100644
--- a/doc/development/fe_guide/index.md
+++ b/doc/development/fe_guide/index.md
@@ -23,22 +23,22 @@ Use [BrowserStack](https://www.browserstack.com/) to test with our supported bro
Current high-level frontend goals are listed on [Frontend Epics](https://gitlab.com/groups/gitlab-org/-/epics?label_name%5B%5D=frontend).
-## [Principles](principles.md)
+## Principles
-High-level guidelines for contributing to GitLab.
+[High-level guidelines](principles.md) for contributing to GitLab.
-## [Development Process](development_process.md)
+## Development Process
-How we plan and execute the work on the frontend.
+How we [plan and execute](development_process.md) the work on the frontend.
-## [Architecture](architecture.md)
+## Architecture
-How we go about making fundamental design decisions in GitLab's frontend team
+How we go about [making fundamental design decisions](architecture.md) in GitLab's frontend team
or make changes to our frontend development guidelines.
-## [Testing](../testing_guide/frontend_testing.md)
+## Testing
-How we write frontend tests, run the GitLab test suite, and debug test related
+How we write [frontend tests](../testing_guide/frontend_testing.md), run the GitLab test suite, and debug test related
issues.
## Pajamas Design System
@@ -46,29 +46,33 @@ issues.
Reusable components with technical and usage guidelines can be found in our
[Pajamas Design System](https://design.gitlab.com/).
-## [Design Patterns](design_patterns.md)
+## Design Patterns
-Common JavaScript design patterns in GitLab's codebase.
+Common JavaScript [design patterns](design_patterns.md) in GitLab's codebase.
-## [Vue.js Best Practices](vue.md)
+## Vue.js Best Practices
-Vue specific design patterns and practices.
+Vue specific [design patterns and practices](vue.md).
-## [Vuex](vuex.md)
+## Vuex
-Vuex specific design patterns and practices.
+[Vuex](vuex.md) specific design patterns and practices.
-## [Axios](axios.md)
+## Axios
-Axios specific practices and gotchas.
+[Axios](axios.md) specific practices and gotchas.
-## [GraphQL](graphql.md)
+## GraphQL
-How to use GraphQL
+How to use [GraphQL](graphql.md).
-## [Icons and Illustrations](icons.md)
+## Icons and Illustrations
-How we use SVG for our Icons and Illustrations.
+How we use SVG for our [Icons and Illustrations](icons.md).
+
+## Dependencies
+
+General information about frontend [dependencies](dependencies.md) and how we manage them.
## Frontend FAQ
diff --git a/doc/ssh/README.md b/doc/ssh/README.md
index 07abfa4cdac..521a2a0876a 100644
--- a/doc/ssh/README.md
+++ b/doc/ssh/README.md
@@ -344,7 +344,7 @@ Integration (CI) server. By using deploy keys, you don't have to set up a
dummy user account.
If you are a project maintainer or owner, you can add a deploy key in the
-project's **Settings > Repository** page by expanding the
+project's **{settings}** **Settings > CI / CD** page by expanding the
**Deploy Keys** section. Specify a title for the new
deploy key and paste a public SSH key. After this, the machine that uses
the corresponding private SSH key has read-only or read-write (if enabled)
@@ -387,7 +387,7 @@ of broader usage for something like "Anywhere you need to give read access to
your repository".
Once a GitLab administrator adds the Global Deployment key, project maintainers
-and owners can add it in project's **Settings > Repository** page by expanding the
+and owners can add it in project's **{settings}** **Settings > CI / CD** page by expanding the
**Deploy Keys** section and clicking **Enable** next to the appropriate key listed
under **Public deploy keys available to any project**.
diff --git a/doc/user/project/pipelines/settings.md b/doc/user/project/pipelines/settings.md
index fe62f5e2185..d4e755dab6b 100644
--- a/doc/user/project/pipelines/settings.md
+++ b/doc/user/project/pipelines/settings.md
@@ -268,6 +268,14 @@ https://example.gitlab.com/<namespace>/<project>/badges/<branch>/coverage.svg?st
[Environment variables](../../../ci/variables/README.html#gitlab-cicd-environment-variables) can be set in an environment to be available to a runner.
+## Deploy Keys
+
+With Deploy Keys, GitLab allows you to import SSH public keys. You can then have
+read only or read/write access to your project from the machines the keys were generated from.
+
+SSH keys added to your project settings will be used for continuous integration,
+staging, or production servers.
+
<!-- ## Troubleshooting
Include any troubleshooting steps that you can foresee. If you know beforehand what issues
diff --git a/doc/user/project/repository/web_editor.md b/doc/user/project/repository/web_editor.md
index 0e47bf2c902..f1947066279 100644
--- a/doc/user/project/repository/web_editor.md
+++ b/doc/user/project/repository/web_editor.md
@@ -75,7 +75,7 @@ ready.
To keep files in the repository organized it is often helpful to create a new
directory.
-From a project's files page, click the '+' button to the right of the branch selector.
+From a project's files page, click the plus button (`+`) to the right of the branch selector.
Choose **New directory** from the dropdown.
![New directory dropdown](img/web_editor_new_directory_dropdown.png)
@@ -91,14 +91,21 @@ There are multiple ways to create a branch from GitLab's web interface.
### Create a new branch from an issue
-> [Introduced][ce-2808] in GitLab 8.6.
+> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/2808) in GitLab 8.6.
+
+If your development workflow dictates to have an issue for every merge
+request, you can quickly create a branch directly from the issue to speed the process up.
+The new branch, and later its merge request, will be marked as related to this issue.
+Once merged, the MR will automatically close the issue.
+You can see a **Create merge request** dropdown below the issue description.
-In case your development workflow dictates to have an issue for every merge
-request, you can quickly create a branch right on the issue page which will be
-tied with the issue itself. You can see a **Create merge request** dropdown
-below the issue description unless there is already a branch with the same
-name or a referenced merge request or your project (still) has an active
-[fork relationship](../settings/index.md#advanced-settings).
+NOTE: **Note:**
+You won't see the **Create merge request** button if there is already a branch with the same
+name or a referenced merge request or your project has an active
+fork relationship.
+If you would like to make this button appear, a possible workaround is to [remove your project's
+fork relationship](../settings/index.md#removing-a-fork-relationship). Once removed, the fork
+relationship cannot be restored and you will no longer be able to send merge requests to the source.
![Create Button](img/web_editor_new_branch_from_issue_create_button_v12_6.png)
@@ -181,8 +188,6 @@ If you'd prefer _not_ to use your primary email address for commits created
through the web editor, you can choose to use another of your linked email
addresses from the **User Settings > Edit Profile** page.
-[ce-2808]: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/2808
-
<!-- ## Troubleshooting
Include any troubleshooting steps that you can foresee. If you know beforehand what issues
diff --git a/doc/user/project/settings/index.md b/doc/user/project/settings/index.md
index 12cc2fe665d..1deb66aacfd 100644
--- a/doc/user/project/settings/index.md
+++ b/doc/user/project/settings/index.md
@@ -215,9 +215,12 @@ To remove a project:
This action either:
- Removes a project including all associated resources (issues, merge requests etc).
-- Since [GitLab 12.6](https://gitlab.com/gitlab-org/gitlab/issues/32935), on [Premium or Silver](https://about.gitlab.com/pricing/) or higher tiers, marks a project for deletion. The deletion will happen 7 days later by default, but this can be changed in the [instance settings](../../admin_area/settings/visibility_and_access_controls.md#default-deletion-adjourned-period-premium-only).
+- Since [GitLab 12.6](https://gitlab.com/gitlab-org/gitlab/issues/32935), on
+ [GitLab Premium or GitLab.com Silver](https://about.gitlab.com/pricing/) or higher tiers, marks a project for
+ deletion. The deletion will happen 7 days later by default, but this can be changed in the
+ [instance settings](../../admin_area/settings/visibility_and_access_controls.md#default-deletion-adjourned-period-premium-only).
-### Restore a project **(PREMIUM)**
+#### Restore a project **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/32935) in GitLab 12.6.
@@ -234,6 +237,9 @@ If you want to use the fork for yourself and don't need to send
[merge requests](../merge_requests.md) to the upstream project,
you can safely remove the fork relationship.
+CAUTION: **Caution:**
+Once removed, the fork relationship cannot be restored. You will no longer be able to send merge requests to the source, and if anyone has forked your project, their fork will also lose the relationship.
+
To do so:
1. Navigate to your project's **Settings > General > Advanced**.
diff --git a/lib/banzai/filter/inline_embeds_filter.rb b/lib/banzai/filter/inline_embeds_filter.rb
index 5b579aeae6b..79ac8555636 100644
--- a/lib/banzai/filter/inline_embeds_filter.rb
+++ b/lib/banzai/filter/inline_embeds_filter.rb
@@ -22,11 +22,18 @@ module Banzai
doc
end
- # Implement in child class.
+ # Child class must provide the metrics_dashboard_url.
#
# Return a Nokogiri::XML::Element to embed in the
- # markdown.
+ # markdown which provides a url to the metric_dashboard endpoint where
+ # data can be requested through a prometheus proxy. InlineMetricsRedactorFilter
+ # is responsible for premissions to see this div (and relies on the class 'js-render-metrics' ).
def create_element(params)
+ doc.document.create_element(
+ 'div',
+ class: 'js-render-metrics',
+ 'data-dashboard-url': metrics_dashboard_url(params)
+ )
end
# Implement in child class unless overriding #embed_params
@@ -71,6 +78,13 @@ module Banzai
Gitlab::Metrics::Dashboard::Url.parse_query(url)
end
end
+
+ # Implement in child class.
+ #
+ # Provides a full url to request the relevant panels of metric data.
+ def metrics_dashboard_url
+ raise NotImplementedError
+ end
end
end
end
diff --git a/lib/banzai/filter/inline_grafana_metrics_filter.rb b/lib/banzai/filter/inline_grafana_metrics_filter.rb
index 321580b532f..69ae747333f 100644
--- a/lib/banzai/filter/inline_grafana_metrics_filter.rb
+++ b/lib/banzai/filter/inline_grafana_metrics_filter.rb
@@ -10,11 +10,7 @@ module Banzai
def create_element(params)
begin_loading_dashboard(params[:url])
- doc.document.create_element(
- 'div',
- class: 'js-render-metrics',
- 'data-dashboard-url': metrics_dashboard_url(params)
- )
+ super
end
def embed_params(node)
diff --git a/lib/banzai/filter/inline_metrics_filter.rb b/lib/banzai/filter/inline_metrics_filter.rb
index 21371e52680..409e8db87f4 100644
--- a/lib/banzai/filter/inline_metrics_filter.rb
+++ b/lib/banzai/filter/inline_metrics_filter.rb
@@ -5,16 +5,6 @@ module Banzai
# HTML filter that inserts a placeholder element for each
# reference to a metrics dashboard.
class InlineMetricsFilter < Banzai::Filter::InlineEmbedsFilter
- # Placeholder element for the frontend to use as an
- # injection point for charts.
- def create_element(params)
- doc.document.create_element(
- 'div',
- class: 'js-render-metrics',
- 'data-dashboard-url': metrics_dashboard_url(params)
- )
- end
-
# Search params for selecting metrics links. A few
# simple checks is enough to boost performance without
# the cost of doing a full regex match.
diff --git a/lib/gitlab/ci/pipeline/chain/build/associations.rb b/lib/gitlab/ci/pipeline/chain/build/associations.rb
new file mode 100644
index 00000000000..eb49c56bcd7
--- /dev/null
+++ b/lib/gitlab/ci/pipeline/chain/build/associations.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Ci
+ module Pipeline
+ module Chain
+ class Build
+ class Associations < Chain::Base
+ def perform!
+ return unless @command.bridge
+
+ @pipeline.build_source_pipeline(
+ source_pipeline: @command.bridge.pipeline,
+ source_project: @command.bridge.project,
+ source_bridge: @command.bridge,
+ project: @command.project
+ )
+ end
+
+ def break?
+ false
+ end
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index aaa81eceed6..77337ddf9ea 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -2066,6 +2066,9 @@ msgstr ""
msgid "Application settings saved successfully"
msgstr ""
+msgid "Application settings update failed"
+msgstr ""
+
msgid "Application uninstalled but failed to destroy: %{error_message}"
msgstr ""
diff --git a/package.json b/package.json
index 645f687186d..d001afae755 100644
--- a/package.json
+++ b/package.json
@@ -39,7 +39,7 @@
"@babel/preset-env": "^7.8.4",
"@gitlab/at.js": "^1.5.5",
"@gitlab/svgs": "^1.104.0",
- "@gitlab/ui": "^9.18.2",
+ "@gitlab/ui": "^9.20.0",
"@gitlab/visual-review-tools": "1.5.1",
"@sentry/browser": "^5.10.2",
"@sourcegraph/code-host-integration": "0.0.30",
diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb
index 5f3b492ea81..d483dcc97a7 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb
@@ -6,12 +6,11 @@ module QA
it 'user creates an event in the activity page upon Git push' do
Flow::Login.sign_in
- project_push = Resource::Repository::ProjectPush.fabricate! do |push|
+ Resource::Repository::ProjectPush.fabricate! do |push|
push.file_name = 'README.md'
push.file_content = '# This is a test project'
push.commit_message = 'Add README.md'
- end
- project_push.project.visit!
+ end.project.visit!
Page::Project::Menu.perform(&:click_activity)
Page::Project::Activity.perform(&:click_push_events)
diff --git a/spec/controllers/projects/deploy_keys_controller_spec.rb b/spec/controllers/projects/deploy_keys_controller_spec.rb
index 25e3e8e37a9..a97f9ebf36b 100644
--- a/spec/controllers/projects/deploy_keys_controller_spec.rb
+++ b/spec/controllers/projects/deploy_keys_controller_spec.rb
@@ -19,10 +19,10 @@ describe Projects::DeployKeysController do
end
context 'when html requested' do
- it 'redirects to project settings with the correct anchor' do
+ it 'redirects to project ci / cd settings with the correct anchor' do
get :index, params: params
- expect(response).to redirect_to(project_settings_repository_path(project, anchor: 'js-deploy-keys-settings'))
+ expect(response).to redirect_to(project_settings_ci_cd_path(project, anchor: 'js-deploy-keys-settings'))
end
end
@@ -87,13 +87,13 @@ describe Projects::DeployKeysController do
it 'creates a new deploy key for the project' do
expect { post :create, params: create_params }.to change(project.deploy_keys, :count).by(1)
- expect(response).to redirect_to(project_settings_repository_path(project, anchor: 'js-deploy-keys-settings'))
+ expect(response).to redirect_to(project_settings_ci_cd_path(project, anchor: 'js-deploy-keys-settings'))
end
it 'redirects to project settings with the correct anchor' do
post :create, params: create_params
- expect(response).to redirect_to(project_settings_repository_path(project, anchor: 'js-deploy-keys-settings'))
+ expect(response).to redirect_to(project_settings_ci_cd_path(project, anchor: 'js-deploy-keys-settings'))
end
context 'when the deploy key is invalid' do
@@ -153,7 +153,7 @@ describe Projects::DeployKeysController do
expect(DeployKeysProject.where(project_id: project.id, deploy_key_id: deploy_key.id).count).to eq(1)
expect(response).to have_gitlab_http_status(:found)
- expect(response).to redirect_to(namespace_project_settings_repository_path(anchor: 'js-deploy-keys-settings'))
+ expect(response).to redirect_to(namespace_project_settings_ci_cd_path(anchor: 'js-deploy-keys-settings'))
end
it 'returns 404' do
@@ -175,7 +175,7 @@ describe Projects::DeployKeysController do
expect(DeployKeysProject.where(project_id: project.id, deploy_key_id: deploy_key.id).count).to eq(1)
expect(response).to have_gitlab_http_status(:found)
- expect(response).to redirect_to(namespace_project_settings_repository_path(anchor: 'js-deploy-keys-settings'))
+ expect(response).to redirect_to(namespace_project_settings_ci_cd_path(anchor: 'js-deploy-keys-settings'))
end
end
end
@@ -216,7 +216,7 @@ describe Projects::DeployKeysController do
put :disable, params: { id: deploy_key.id, namespace_id: project.namespace, project_id: project }
expect(response).to have_gitlab_http_status(:found)
- expect(response).to redirect_to(namespace_project_settings_repository_path(anchor: 'js-deploy-keys-settings'))
+ expect(response).to redirect_to(namespace_project_settings_ci_cd_path(anchor: 'js-deploy-keys-settings'))
expect { DeployKey.find(deploy_key.id) }.to raise_error(ActiveRecord::RecordNotFound)
end
@@ -239,7 +239,7 @@ describe Projects::DeployKeysController do
end.to change { DeployKey.count }.by(-1)
expect(response).to have_gitlab_http_status(:found)
- expect(response).to redirect_to(namespace_project_settings_repository_path(anchor: 'js-deploy-keys-settings'))
+ expect(response).to redirect_to(namespace_project_settings_ci_cd_path(anchor: 'js-deploy-keys-settings'))
expect { DeployKey.find(deploy_key.id) }.to raise_error(ActiveRecord::RecordNotFound)
end
diff --git a/spec/features/projects/deploy_keys_spec.rb b/spec/features/projects/deploy_keys_spec.rb
index 0f3e7646673..03b7c54faf6 100644
--- a/spec/features/projects/deploy_keys_spec.rb
+++ b/spec/features/projects/deploy_keys_spec.rb
@@ -17,9 +17,9 @@ describe 'Project deploy keys', :js do
end
it 'removes association between project and deploy key' do
- visit project_settings_repository_path(project)
+ visit project_settings_ci_cd_path(project)
- page.within(find('.deploy-keys')) do
+ page.within(find('.qa-deploy-keys-settings')) do
expect(page).to have_selector('.deploy-key', count: 1)
accept_confirm { find('.ic-remove').click }
diff --git a/spec/features/projects/settings/ci_cd_settings_spec.rb b/spec/features/projects/settings/ci_cd_settings_spec.rb
index e69ee31e582..8b9b1ac00c3 100644
--- a/spec/features/projects/settings/ci_cd_settings_spec.rb
+++ b/spec/features/projects/settings/ci_cd_settings_spec.rb
@@ -2,10 +2,10 @@
require 'spec_helper'
-describe 'Projects > Settings > CI/CD settings' do
- let(:project) { create(:project_empty_repo) }
- let(:user) { create(:user) }
- let(:role) { :maintainer }
+describe 'Projects > Settings > CI / CD settings' do
+ let_it_be(:project) { create(:project_empty_repo) }
+ let_it_be(:user) { create(:user) }
+ let_it_be(:role) { :maintainer }
context 'Deploy tokens' do
let!(:deploy_token) { create(:deploy_token, projects: [project]) }
@@ -21,4 +21,92 @@ describe 'Projects > Settings > CI/CD settings' do
let(:entity_type) { 'project' }
end
end
+
+ context 'Deploy Keys', :js do
+ let_it_be(:private_deploy_key) { create(:deploy_key, title: 'private_deploy_key', public: false) }
+ let_it_be(:public_deploy_key) { create(:another_deploy_key, title: 'public_deploy_key', public: true) }
+ let(:new_ssh_key) { attributes_for(:key)[:key] }
+
+ before do
+ project.add_role(user, role)
+ sign_in(user)
+ end
+
+ it 'get list of keys' do
+ project.deploy_keys << private_deploy_key
+ project.deploy_keys << public_deploy_key
+
+ visit project_settings_ci_cd_path(project)
+
+ expect(page).to have_content('private_deploy_key')
+ expect(page).to have_content('public_deploy_key')
+ end
+
+ it 'add a new deploy key' do
+ visit project_settings_ci_cd_path(project)
+
+ fill_in 'deploy_key_title', with: 'new_deploy_key'
+ fill_in 'deploy_key_key', with: new_ssh_key
+ check 'deploy_key_deploy_keys_projects_attributes_0_can_push'
+ click_button 'Add key'
+
+ expect(page).to have_content('new_deploy_key')
+ expect(page).to have_content('Write access allowed')
+ end
+
+ it 'edit an existing deploy key' do
+ project.deploy_keys << private_deploy_key
+ visit project_settings_ci_cd_path(project)
+
+ find('.deploy-key', text: private_deploy_key.title).find('.ic-pencil').click
+
+ fill_in 'deploy_key_title', with: 'updated_deploy_key'
+ check 'deploy_key_deploy_keys_projects_attributes_0_can_push'
+ click_button 'Save changes'
+
+ expect(page).to have_content('updated_deploy_key')
+ expect(page).to have_content('Write access allowed')
+ end
+
+ it 'edit an existing public deploy key to be writable' do
+ project.deploy_keys << public_deploy_key
+ visit project_settings_ci_cd_path(project)
+
+ find('.deploy-key', text: public_deploy_key.title).find('.ic-pencil').click
+
+ check 'deploy_key_deploy_keys_projects_attributes_0_can_push'
+ click_button 'Save changes'
+
+ expect(page).to have_content('public_deploy_key')
+ expect(page).to have_content('Write access allowed')
+ end
+
+ it 'edit a deploy key from projects user has access to' do
+ project2 = create(:project_empty_repo)
+ project2.add_role(user, role)
+ project2.deploy_keys << private_deploy_key
+
+ visit project_settings_ci_cd_path(project)
+
+ find('.js-deployKeys-tab-available_project_keys').click
+
+ find('.deploy-key', text: private_deploy_key.title).find('.ic-pencil').click
+
+ fill_in 'deploy_key_title', with: 'updated_deploy_key'
+ click_button 'Save changes'
+
+ find('.js-deployKeys-tab-available_project_keys').click
+
+ expect(page).to have_content('updated_deploy_key')
+ end
+
+ it 'remove an existing deploy key' do
+ project.deploy_keys << private_deploy_key
+ visit project_settings_ci_cd_path(project)
+
+ accept_confirm { find('.deploy-key', text: private_deploy_key.title).find('.ic-remove').click }
+
+ expect(page).not_to have_content(private_deploy_key.title)
+ end
+ end
end
diff --git a/spec/features/projects/settings/repository_settings_spec.rb b/spec/features/projects/settings/repository_settings_spec.rb
index d750234d9ad..9030cd6a648 100644
--- a/spec/features/projects/settings/repository_settings_spec.rb
+++ b/spec/features/projects/settings/repository_settings_spec.rb
@@ -25,89 +25,6 @@ describe 'Projects > Settings > Repository settings' do
context 'for maintainer' do
let(:role) { :maintainer }
- context 'Deploy Keys', :js do
- let(:private_deploy_key) { create(:deploy_key, title: 'private_deploy_key', public: false) }
- let(:public_deploy_key) { create(:another_deploy_key, title: 'public_deploy_key', public: true) }
- let(:new_ssh_key) { attributes_for(:key)[:key] }
-
- it 'get list of keys' do
- project.deploy_keys << private_deploy_key
- project.deploy_keys << public_deploy_key
-
- visit project_settings_repository_path(project)
-
- expect(page).to have_content('private_deploy_key')
- expect(page).to have_content('public_deploy_key')
- end
-
- it 'add a new deploy key' do
- visit project_settings_repository_path(project)
-
- fill_in 'deploy_key_title', with: 'new_deploy_key'
- fill_in 'deploy_key_key', with: new_ssh_key
- check 'deploy_key_deploy_keys_projects_attributes_0_can_push'
- click_button 'Add key'
-
- expect(page).to have_content('new_deploy_key')
- expect(page).to have_content('Write access allowed')
- end
-
- it 'edit an existing deploy key' do
- project.deploy_keys << private_deploy_key
- visit project_settings_repository_path(project)
-
- find('.deploy-key', text: private_deploy_key.title).find('.ic-pencil').click
-
- fill_in 'deploy_key_title', with: 'updated_deploy_key'
- check 'deploy_key_deploy_keys_projects_attributes_0_can_push'
- click_button 'Save changes'
-
- expect(page).to have_content('updated_deploy_key')
- expect(page).to have_content('Write access allowed')
- end
-
- it 'edit an existing public deploy key to be writable' do
- project.deploy_keys << public_deploy_key
- visit project_settings_repository_path(project)
-
- find('.deploy-key', text: public_deploy_key.title).find('.ic-pencil').click
-
- check 'deploy_key_deploy_keys_projects_attributes_0_can_push'
- click_button 'Save changes'
-
- expect(page).to have_content('public_deploy_key')
- expect(page).to have_content('Write access allowed')
- end
-
- it 'edit a deploy key from projects user has access to' do
- project2 = create(:project_empty_repo)
- project2.add_role(user, role)
- project2.deploy_keys << private_deploy_key
-
- visit project_settings_repository_path(project)
-
- find('.js-deployKeys-tab-available_project_keys').click
-
- find('.deploy-key', text: private_deploy_key.title).find('.ic-pencil').click
-
- fill_in 'deploy_key_title', with: 'updated_deploy_key'
- click_button 'Save changes'
-
- find('.js-deployKeys-tab-available_project_keys').click
-
- expect(page).to have_content('updated_deploy_key')
- end
-
- it 'remove an existing deploy key' do
- project.deploy_keys << private_deploy_key
- visit project_settings_repository_path(project)
-
- accept_confirm { find('.deploy-key', text: private_deploy_key.title).find('.ic-remove').click }
-
- expect(page).not_to have_content(private_deploy_key.title)
- end
- end
-
context 'remote mirror settings' do
let(:user2) { create(:user) }
diff --git a/spec/features/projects/settings/user_interacts_with_deploy_keys_spec.rb b/spec/features/projects/settings/user_interacts_with_deploy_keys_spec.rb
index cd9299150b2..ac7788ba1fa 100644
--- a/spec/features/projects/settings/user_interacts_with_deploy_keys_spec.rb
+++ b/spec/features/projects/settings/user_interacts_with_deploy_keys_spec.rb
@@ -20,7 +20,7 @@ describe "User interacts with deploy keys", :js do
click_button("Enable")
expect(page).not_to have_selector(".fa-spinner")
- expect(current_path).to eq(project_settings_repository_path(project))
+ expect(current_path).to eq(project_settings_ci_cd_path(project))
find(".js-deployKeys-tab-enabled_keys").click
@@ -96,7 +96,7 @@ describe "User interacts with deploy keys", :js do
click_button("Add key")
- expect(current_path).to eq(project_settings_repository_path(project))
+ expect(current_path).to eq(project_settings_ci_cd_path(project))
page.within(".deploy-keys") do
expect(page).to have_content(DEPLOY_KEY_TITLE)
diff --git a/spec/helpers/award_emoji_helper_spec.rb b/spec/helpers/award_emoji_helper_spec.rb
index 975f32edd42..3dee466a80c 100644
--- a/spec/helpers/award_emoji_helper_spec.rb
+++ b/spec/helpers/award_emoji_helper_spec.rb
@@ -64,7 +64,7 @@ describe AwardEmojiHelper do
it 'returns correct url' do
@project = issue.project
- expected_url = "/#{@project.namespace.path}/#{@project.path}/issues/#{issue.iid}/toggle_award_emoji"
+ expected_url = "/#{@project.namespace.path}/#{@project.path}/-/issues/#{issue.iid}/toggle_award_emoji"
expect(subject).to eq(expected_url)
end
diff --git a/spec/helpers/boards_helper_spec.rb b/spec/helpers/boards_helper_spec.rb
index e731b95586f..f5e5285554c 100644
--- a/spec/helpers/boards_helper_spec.rb
+++ b/spec/helpers/boards_helper_spec.rb
@@ -11,7 +11,7 @@ describe BoardsHelper do
@project = project
@board = create(:board, project: @project)
- expect(build_issue_link_base).to eq("/#{@project.namespace.path}/#{@project.path}/issues")
+ expect(build_issue_link_base).to eq("/#{@project.namespace.path}/#{@project.path}/-/issues")
end
end
diff --git a/spec/helpers/events_helper_spec.rb b/spec/helpers/events_helper_spec.rb
index 062fa8f106e..61229127770 100644
--- a/spec/helpers/events_helper_spec.rb
+++ b/spec/helpers/events_helper_spec.rb
@@ -110,7 +110,7 @@ describe EventsHelper do
it 'returns a project issue url' do
event.target = create(:note_on_issue, note: 'nice work')
- expect(subject).to eq("#{project_base_url}/issues/#{event.note_target.iid}#note_#{event.target.id}")
+ expect(subject).to eq("#{project_base_url}/-/issues/#{event.note_target.iid}#note_#{event.target.id}")
end
it 'returns a merge request url' do
diff --git a/spec/helpers/issuables_helper_spec.rb b/spec/helpers/issuables_helper_spec.rb
index a39110d0aa7..7971eb8849d 100644
--- a/spec/helpers/issuables_helper_spec.rb
+++ b/spec/helpers/issuables_helper_spec.rb
@@ -183,8 +183,8 @@ describe IssuablesHelper do
@project = issue.project
expected_data = {
- endpoint: "/#{@project.full_path}/issues/#{issue.iid}",
- updateEndpoint: "/#{@project.full_path}/issues/#{issue.iid}.json",
+ endpoint: "/#{@project.full_path}/-/issues/#{issue.iid}",
+ updateEndpoint: "/#{@project.full_path}/-/issues/#{issue.iid}.json",
canUpdate: true,
canDestroy: true,
issuableRef: "##{issue.iid}",
diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb
index a394812f8f0..dad740d3b80 100644
--- a/spec/helpers/issues_helper_spec.rb
+++ b/spec/helpers/issues_helper_spec.rb
@@ -200,7 +200,7 @@ describe IssuesHelper do
shared_examples 'successfully displays link to issue and with css class' do |action|
it 'returns link' do
- link = "<a class=\"#{css_class}\" href=\"/#{new_issue.project.full_path}/issues/#{new_issue.iid}\">(#{action})</a>"
+ link = "<a class=\"#{css_class}\" href=\"/#{new_issue.project.full_path}/-/issues/#{new_issue.iid}\">(#{action})</a>"
expect(helper.issue_closed_link(issue, user, css_class: css_class)).to match(link)
end
diff --git a/spec/helpers/labels_helper_spec.rb b/spec/helpers/labels_helper_spec.rb
index 322390c3840..ec70041d51f 100644
--- a/spec/helpers/labels_helper_spec.rb
+++ b/spec/helpers/labels_helper_spec.rb
@@ -56,7 +56,7 @@ describe LabelsHelper do
context 'without subject' do
it "uses the label's project" do
- expect(link_to_label(label_presenter)).to match %r{<a.*href="/#{label.project.full_path}/issues\?label_name%5B%5D=#{label.name}".*>.*</a>}m
+ expect(link_to_label(label_presenter)).to match %r{<a.*href="/#{label.project.full_path}/-/issues\?label_name%5B%5D=#{label.name}".*>.*</a>}m
end
end
@@ -65,7 +65,7 @@ describe LabelsHelper do
let(:subject) { build(:project, namespace: namespace, name: 'bar3') }
it 'links to project issues page' do
- expect(link_to_label(label_presenter)).to match %r{<a.*href="/foo3/bar3/issues\?label_name%5B%5D=#{label.name}".*>.*</a>}m
+ expect(link_to_label(label_presenter)).to match %r{<a.*href="/foo3/bar3/-/issues\?label_name%5B%5D=#{label.name}".*>.*</a>}m
end
end
@@ -78,15 +78,7 @@ describe LabelsHelper do
end
context 'with a type argument' do
- ['issue', :issue].each do |type|
- context "set to #{type}" do
- it 'links to correct page' do
- expect(link_to_label(label_presenter, type: type)).to match %r{<a.*href="/#{label.project.full_path}/#{type.to_s.pluralize}\?label_name%5B%5D=#{label.name}".*>.*</a>}m
- end
- end
- end
-
- ['merge_request', :merge_request].each do |type|
+ ['issue', :issue, 'merge_request', :merge_request].each do |type|
context "set to #{type}" do
it 'links to correct page' do
expect(link_to_label(label_presenter, type: type)).to match %r{<a.*href="/#{label.project.full_path}/-/#{type.to_s.pluralize}\?label_name%5B%5D=#{label.name}".*>.*</a>}m
diff --git a/spec/helpers/notes_helper_spec.rb b/spec/helpers/notes_helper_spec.rb
index 1dc7f4e98ab..f074a918e7f 100644
--- a/spec/helpers/notes_helper_spec.rb
+++ b/spec/helpers/notes_helper_spec.rb
@@ -272,7 +272,7 @@ describe NotesHelper do
let(:note) { create(:note_on_issue, noteable: issue, project: project) }
it 'returns the noteable url with an anchor to the note' do
- expect(noteable_note_url(note)).to match("/#{project.namespace.path}/#{project.path}/issues/#{issue.iid}##{dom_id(note)}")
+ expect(noteable_note_url(note)).to match("/#{project.namespace.path}/#{project.path}/-/issues/#{issue.iid}##{dom_id(note)}")
end
end
diff --git a/spec/javascripts/diffs/mock_data/diff_discussions.js b/spec/javascripts/diffs/mock_data/diff_discussions.js
index a9b00634104..dc25dd1647a 100644
--- a/spec/javascripts/diffs/mock_data/diff_discussions.js
+++ b/spec/javascripts/diffs/mock_data/diff_discussions.js
@@ -64,7 +64,7 @@ export default {
resolve_path:
'/gitlab-org/gitlab-test/-/merge_requests/20/discussions/6b232e05bea388c6b043ccc243ba505faac04ea8/resolve',
resolve_with_issue_path:
- '/gitlab-org/gitlab-test/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20',
+ '/gitlab-org/gitlab-test/-/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20',
},
{
id: '1753',
@@ -117,7 +117,7 @@ export default {
resolve_path:
'/gitlab-org/gitlab-test/-/merge_requests/20/discussions/6b232e05bea388c6b043ccc243ba505faac04ea8/resolve',
resolve_with_issue_path:
- '/gitlab-org/gitlab-test/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20',
+ '/gitlab-org/gitlab-test/-/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20',
},
{
id: '1754',
@@ -160,7 +160,7 @@ export default {
resolve_path:
'/gitlab-org/gitlab-test/-/merge_requests/20/discussions/6b232e05bea388c6b043ccc243ba505faac04ea8/resolve',
resolve_with_issue_path:
- '/gitlab-org/gitlab-test/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20',
+ '/gitlab-org/gitlab-test/-/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20',
},
{
id: '1755',
@@ -203,7 +203,7 @@ export default {
resolve_path:
'/gitlab-org/gitlab-test/-/merge_requests/20/discussions/6b232e05bea388c6b043ccc243ba505faac04ea8/resolve',
resolve_with_issue_path:
- '/gitlab-org/gitlab-test/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20',
+ '/gitlab-org/gitlab-test/-/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20',
},
{
id: '1756',
@@ -246,7 +246,7 @@ export default {
resolve_path:
'/gitlab-org/gitlab-test/-/merge_requests/20/discussions/6b232e05bea388c6b043ccc243ba505faac04ea8/resolve',
resolve_with_issue_path:
- '/gitlab-org/gitlab-test/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20',
+ '/gitlab-org/gitlab-test/-/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20',
},
],
individual_note: false,
@@ -255,7 +255,7 @@ export default {
resolve_path:
'/gitlab-org/gitlab-test/-/merge_requests/20/discussions/6b232e05bea388c6b043ccc243ba505faac04ea8/resolve',
resolve_with_issue_path:
- '/gitlab-org/gitlab-test/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20',
+ '/gitlab-org/gitlab-test/-/issues/new?discussion_to_resolve=6b232e05bea388c6b043ccc243ba505faac04ea8&merge_request_to_resolve_discussions_of=20',
diff_file: {
submodule: false,
submodule_link: null,
diff --git a/spec/javascripts/issue_show/components/app_spec.js b/spec/javascripts/issue_show/components/app_spec.js
index fdd6f4e6470..f11d4f5ac33 100644
--- a/spec/javascripts/issue_show/components/app_spec.js
+++ b/spec/javascripts/issue_show/components/app_spec.js
@@ -40,17 +40,19 @@ describe('Issuable output', () => {
const IssuableDescriptionComponent = Vue.extend(issuableApp);
mock = new MockAdapter(axios);
- mock.onGet('/gitlab-org/gitlab-shell/issues/9/realtime_changes/realtime_changes').reply(() => {
- const res = Promise.resolve([200, REALTIME_REQUEST_STACK[realtimeRequestCount]]);
- realtimeRequestCount += 1;
- return res;
- });
+ mock
+ .onGet('/gitlab-org/gitlab-shell/-/issues/9/realtime_changes/realtime_changes')
+ .reply(() => {
+ const res = Promise.resolve([200, REALTIME_REQUEST_STACK[realtimeRequestCount]]);
+ realtimeRequestCount += 1;
+ return res;
+ });
vm = new IssuableDescriptionComponent({
propsData: {
canUpdate: true,
canDestroy: true,
- endpoint: '/gitlab-org/gitlab-shell/issues/9/realtime_changes',
+ endpoint: '/gitlab-org/gitlab-shell/-/issues/9/realtime_changes',
updateEndpoint: gl.TEST_HOST,
issuableRef: '#1',
initialTitleHtml: '',
diff --git a/spec/javascripts/vue_mr_widget/mock_data.js b/spec/javascripts/vue_mr_widget/mock_data.js
index 048a5f88c99..d11756d712a 100644
--- a/spec/javascripts/vue_mr_widget/mock_data.js
+++ b/spec/javascripts/vue_mr_widget/mock_data.js
@@ -216,7 +216,7 @@ export default {
remove_wip_path: '/root/acets-app/-/merge_requests/22/remove_wip',
cancel_auto_merge_path: '/root/acets-app/-/merge_requests/22/cancel_auto_merge',
create_issue_to_resolve_discussions_path:
- '/root/acets-app/issues/new?merge_request_to_resolve_discussions_of=22',
+ '/root/acets-app/-/issues/new?merge_request_to_resolve_discussions_of=22',
merge_path: '/root/acets-app/-/merge_requests/22/merge',
cherry_pick_in_fork_path:
'/root/acets-app/forks?continue%5Bnotice%5D=You%27re+not+allowed+to+make+changes+to+this+project+directly.+A+fork+of+this+project+has+been+created+that+you+can+make+changes+in%2C+so+you+can+submit+a+merge+request.+Try+to+revert+this+commit+again.&continue%5Bnotice_now%5D=You%27re+not+allowed+to+make+changes+to+this+project+directly.+A+fork+of+this+project+is+being+created+that+you+can+make+changes+in%2C+so+you+can+submit+a+merge+request.&continue%5Bto%5D=%2Froot%2Facets-app%2Fmerge_requests%2F22&namespace_key=1',
diff --git a/spec/lib/gitlab/ci/pipeline/chain/build/associations_spec.rb b/spec/lib/gitlab/ci/pipeline/chain/build/associations_spec.rb
new file mode 100644
index 00000000000..542a2462b59
--- /dev/null
+++ b/spec/lib/gitlab/ci/pipeline/chain/build/associations_spec.rb
@@ -0,0 +1,62 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe Gitlab::Ci::Pipeline::Chain::Build::Associations do
+ let(:project) { create(:project, :repository) }
+ let(:user) { create(:user, developer_projects: [project]) }
+ let(:pipeline) { Ci::Pipeline.new }
+ let(:step) { described_class.new(pipeline, command) }
+
+ let(:command) do
+ Gitlab::Ci::Pipeline::Chain::Command.new(
+ source: :push,
+ origin_ref: 'master',
+ checkout_sha: project.commit.id,
+ after_sha: nil,
+ before_sha: nil,
+ trigger_request: nil,
+ schedule: nil,
+ merge_request: nil,
+ project: project,
+ current_user: user,
+ bridge: bridge)
+ end
+
+ context 'when a bridge is passed in to the pipeline creation' do
+ let(:bridge) { create(:ci_bridge) }
+
+ it 'links the pipeline to the upstream bridge job' do
+ step.perform!
+
+ expect(pipeline.source_pipeline).to be_present
+ expect(pipeline.source_pipeline).to be_valid
+ expect(pipeline.source_pipeline).to have_attributes(
+ source_pipeline: bridge.pipeline, source_project: bridge.project,
+ source_bridge: bridge, project: project
+ )
+ end
+
+ it 'never breaks the chain' do
+ step.perform!
+
+ expect(step.break?).to eq(false)
+ end
+ end
+
+ context 'when a bridge is not passed in to the pipeline creation' do
+ let(:bridge) { nil }
+
+ it 'leaves the source pipeline empty' do
+ step.perform!
+
+ expect(pipeline.source_pipeline).to be_nil
+ end
+
+ it 'never breaks the chain' do
+ step.perform!
+
+ expect(step.break?).to eq(false)
+ end
+ end
+end
diff --git a/spec/lib/gitlab/url_builder_spec.rb b/spec/lib/gitlab/url_builder_spec.rb
index 49011b100ab..11bbf444b1d 100644
--- a/spec/lib/gitlab/url_builder_spec.rb
+++ b/spec/lib/gitlab/url_builder_spec.rb
@@ -20,7 +20,7 @@ describe Gitlab::UrlBuilder do
url = described_class.build(issue)
- expect(url).to eq "#{Settings.gitlab['url']}/#{issue.project.full_path}/issues/#{issue.iid}"
+ expect(url).to eq "#{Settings.gitlab['url']}/#{issue.project.full_path}/-/issues/#{issue.iid}"
end
end
@@ -107,7 +107,7 @@ describe Gitlab::UrlBuilder do
url = described_class.build(note)
- expect(url).to eq "#{Settings.gitlab['url']}/#{issue.project.full_path}/issues/#{issue.iid}#note_#{note.id}"
+ expect(url).to eq "#{Settings.gitlab['url']}/#{issue.project.full_path}/-/issues/#{issue.iid}#note_#{note.id}"
end
end
diff --git a/spec/models/project_services/gitlab_issue_tracker_service_spec.rb b/spec/models/project_services/gitlab_issue_tracker_service_spec.rb
index defebcee9c6..7f1c6224b7d 100644
--- a/spec/models/project_services/gitlab_issue_tracker_service_spec.rb
+++ b/spec/models/project_services/gitlab_issue_tracker_service_spec.rb
@@ -33,9 +33,9 @@ describe GitlabIssueTrackerService do
end
it 'gives the correct path' do
- expect(service.project_url).to eq("http://#{Gitlab.config.gitlab.host}/gitlab/root/#{project.full_path}/issues")
- expect(service.new_issue_url).to eq("http://#{Gitlab.config.gitlab.host}/gitlab/root/#{project.full_path}/issues/new")
- expect(service.issue_url(432)).to eq("http://#{Gitlab.config.gitlab.host}/gitlab/root/#{project.full_path}/issues/432")
+ expect(service.project_url).to eq("http://#{Gitlab.config.gitlab.host}/gitlab/root/#{project.full_path}/-/issues")
+ expect(service.new_issue_url).to eq("http://#{Gitlab.config.gitlab.host}/gitlab/root/#{project.full_path}/-/issues/new")
+ expect(service.issue_url(432)).to eq("http://#{Gitlab.config.gitlab.host}/gitlab/root/#{project.full_path}/-/issues/432")
end
end
@@ -45,9 +45,9 @@ describe GitlabIssueTrackerService do
end
it 'gives the correct path' do
- expect(service.issue_tracker_path).to eq("/gitlab/root/#{project.full_path}/issues")
- expect(service.new_issue_path).to eq("/gitlab/root/#{project.full_path}/issues/new")
- expect(service.issue_path(432)).to eq("/gitlab/root/#{project.full_path}/issues/432")
+ expect(service.issue_tracker_path).to eq("/gitlab/root/#{project.full_path}/-/issues")
+ expect(service.new_issue_path).to eq("/gitlab/root/#{project.full_path}/-/issues/new")
+ expect(service.issue_path(432)).to eq("/gitlab/root/#{project.full_path}/-/issues/432")
end
end
end
diff --git a/spec/presenters/issue_presenter_spec.rb b/spec/presenters/issue_presenter_spec.rb
index 1eb674d1f8f..4a4caef9d28 100644
--- a/spec/presenters/issue_presenter_spec.rb
+++ b/spec/presenters/issue_presenter_spec.rb
@@ -17,7 +17,7 @@ describe IssuePresenter do
describe '#web_url' do
it 'returns correct path' do
- expect(presenter.web_url).to eq("http://localhost/#{group.name}/#{project.name}/issues/#{issue.iid}")
+ expect(presenter.web_url).to eq("http://localhost/#{group.name}/#{project.name}/-/issues/#{issue.iid}")
end
end
@@ -37,7 +37,7 @@ describe IssuePresenter do
describe '#issue_path' do
it 'returns correct path' do
- expect(presenter.issue_path).to eq("/#{group.name}/#{project.name}/issues/#{issue.iid}")
+ expect(presenter.issue_path).to eq("/#{group.name}/#{project.name}/-/issues/#{issue.iid}")
end
end
end
diff --git a/spec/presenters/merge_request_presenter_spec.rb b/spec/presenters/merge_request_presenter_spec.rb
index 025f083ab27..f184e767f8c 100644
--- a/spec/presenters/merge_request_presenter_spec.rb
+++ b/spec/presenters/merge_request_presenter_spec.rb
@@ -128,11 +128,11 @@ describe MergeRequestPresenter do
subject { described_class.new(resource, current_user: user).closing_issues_links }
it 'presents closing issues links' do
- is_expected.to match("#{project.full_path}/issues/#{issue_a.iid}")
+ is_expected.to match("#{project.full_path}/-/issues/#{issue_a.iid}")
end
it 'does not present related issues links' do
- is_expected.not_to match("#{project.full_path}/issues/#{issue_b.iid}")
+ is_expected.not_to match("#{project.full_path}/-/issues/#{issue_b.iid}")
end
it 'appends status when closing issue is already closed' do
@@ -148,11 +148,11 @@ describe MergeRequestPresenter do
end
it 'presents related issues links' do
- is_expected.to match("#{project.full_path}/issues/#{issue_b.iid}")
+ is_expected.to match("#{project.full_path}/-/issues/#{issue_b.iid}")
end
it 'does not present closing issues links' do
- is_expected.not_to match("#{project.full_path}/issues/#{issue_a.iid}")
+ is_expected.not_to match("#{project.full_path}/-/issues/#{issue_a.iid}")
end
it 'appends status when mentioned issue is already closed' do
@@ -275,7 +275,7 @@ describe MergeRequestPresenter do
project.add_maintainer(user)
is_expected
- .to eq("/#{resource.project.full_path}/issues/new?merge_request_to_resolve_discussions_of=#{resource.iid}")
+ .to eq("/#{resource.project.full_path}/-/issues/new?merge_request_to_resolve_discussions_of=#{resource.iid}")
end
end
diff --git a/spec/requests/api/releases_spec.rb b/spec/requests/api/releases_spec.rb
index 12fd9f431e5..f9e7253a88b 100644
--- a/spec/requests/api/releases_spec.rb
+++ b/spec/requests/api/releases_spec.rb
@@ -78,7 +78,7 @@ describe API::Releases do
issue_uri = URI.parse(links['issues_url'])
expect(mr_uri.path).to eq("#{path_base}/-/merge_requests")
- expect(issue_uri.path).to eq("#{path_base}/issues")
+ expect(issue_uri.path).to eq("#{path_base}/-/issues")
expect(mr_uri.query).to eq(expected_query)
expect(issue_uri.query).to eq(expected_query)
end
diff --git a/spec/services/ci/create_cross_project_pipeline_service_spec.rb b/spec/services/ci/create_cross_project_pipeline_service_spec.rb
index 51cf18f8d87..09d44bcea0a 100644
--- a/spec/services/ci/create_cross_project_pipeline_service_spec.rb
+++ b/spec/services/ci/create_cross_project_pipeline_service_spec.rb
@@ -109,7 +109,7 @@ describe Ci::CreateCrossProjectPipelineService, '#execute' do
expect(pipeline.source_bridge).to be_a ::Ci::Bridge
end
- it 'updates bridge status when downstream pipeline gets proceesed' do
+ it 'updates bridge status when downstream pipeline gets processed' do
pipeline = service.execute(bridge)
expect(pipeline.reload).to be_pending
@@ -128,6 +128,37 @@ describe Ci::CreateCrossProjectPipelineService, '#execute' do
end
end
+ context 'when downstream pipeline has yaml configuration error' do
+ before do
+ stub_ci_pipeline_yaml_file(YAML.dump(job: { invalid: 'yaml' }))
+ end
+
+ it 'creates only one new pipeline' do
+ expect { service.execute(bridge) }
+ .to change { Ci::Pipeline.count }.by(1)
+ end
+
+ it 'creates a new pipeline in a downstream project' do
+ pipeline = service.execute(bridge)
+
+ expect(pipeline.user).to eq bridge.user
+ expect(pipeline.project).to eq downstream_project
+ expect(bridge.sourced_pipelines.first.pipeline).to eq pipeline
+ expect(pipeline.triggered_by_pipeline).to eq upstream_pipeline
+ expect(pipeline.source_bridge).to eq bridge
+ expect(pipeline.source_bridge).to be_a ::Ci::Bridge
+ end
+
+ it 'does not update bridge status when downstream pipeline gets processed' do
+ pipeline = service.execute(bridge)
+
+ expect(pipeline.reload).to be_failed
+ # TODO: This should change to failed once #198354 gets fixed.
+ # https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25706
+ expect(bridge.reload).to be_pending
+ end
+ end
+
context 'when downstream project is the same as the job project' do
let(:trigger) do
{ trigger: { project: upstream_project.full_path } }
@@ -173,7 +204,7 @@ describe Ci::CreateCrossProjectPipelineService, '#execute' do
expect(pipeline.source_bridge).to be_a ::Ci::Bridge
end
- it 'updates bridge status when downstream pipeline gets proceesed' do
+ it 'updates bridge status when downstream pipeline gets processed' do
pipeline = service.execute(bridge)
expect(pipeline.reload).to be_pending
diff --git a/spec/services/ci/create_pipeline_service/custom_config_content_spec.rb b/spec/services/ci/create_pipeline_service/custom_config_content_spec.rb
index 33cd6e164b0..2657f1d300a 100644
--- a/spec/services/ci/create_pipeline_service/custom_config_content_spec.rb
+++ b/spec/services/ci/create_pipeline_service/custom_config_content_spec.rb
@@ -4,18 +4,22 @@ require 'spec_helper'
describe Ci::CreatePipelineService do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { create(:admin) }
+ let(:upstream_pipeline) { create(:ci_pipeline) }
let(:ref) { 'refs/heads/master' }
let(:service) { described_class.new(project, user, { ref: ref }) }
context 'custom config content' do
let(:bridge) do
- double(:bridge, yaml_for_downstream: <<~YML
- rspec:
- script: rspec
- custom:
- script: custom
- YML
- )
+ create(:ci_bridge, status: 'running', pipeline: upstream_pipeline, project: upstream_pipeline.project).tap do |bridge|
+ allow(bridge).to receive(:yaml_for_downstream).and_return(
+ <<~YML
+ rspec:
+ script: rspec
+ custom:
+ script: custom
+ YML
+ )
+ end
end
subject { service.execute(:push, bridge: bridge) }
diff --git a/spec/services/error_tracking/issue_details_service_spec.rb b/spec/services/error_tracking/issue_details_service_spec.rb
index 9f217deda21..66b8988f8e3 100644
--- a/spec/services/error_tracking/issue_details_service_spec.rb
+++ b/spec/services/error_tracking/issue_details_service_spec.rb
@@ -27,7 +27,7 @@ describe ErrorTracking::IssueDetailsService do
create(:sentry_issue, issue: gitlab_issue, sentry_issue_identifier: detailed_error.id)
expect(result[:issue].gitlab_issue).to include(
- "http", "/#{project.full_path}/issues/#{gitlab_issue.iid}"
+ "http", "/#{project.full_path}/-/issues/#{gitlab_issue.iid}"
)
end
diff --git a/spec/views/admin/application_settings/integrations.html.haml_spec.rb b/spec/views/admin/application_settings/integrations.html.haml_spec.rb
index e51cbb9fbfe..392d43ef2d4 100644
--- a/spec/views/admin/application_settings/integrations.html.haml_spec.rb
+++ b/spec/views/admin/application_settings/integrations.html.haml_spec.rb
@@ -11,7 +11,6 @@ describe 'admin/application_settings/integrations.html.haml' do
before do
assign(:application_setting, app_settings)
allow(Gitlab::Sourcegraph).to receive(:feature_available?).and_return(sourcegraph_flag)
- allow(License).to receive(:feature_available?).with(:elastic_search).and_return(false) if defined?(License)
end
context 'when sourcegraph feature is enabled' do
diff --git a/yarn.lock b/yarn.lock
index 3a98c0e795e..b48f6ef39f1 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -801,10 +801,10 @@
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.104.0.tgz#ebbf99788d74b7224f116f1c0040fa0c90034d99"
integrity sha512-lWg/EzxFdbx4YIdDWB2p5ag6Cna78AYGET8nXQYXYwd21/U3wKXKL7vsGR4kOxe1goA9ZAYG9eY+MK7cf+X2cA==
-"@gitlab/ui@^9.18.2":
- version "9.18.2"
- resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-9.18.2.tgz#b82387a8c7bde1db069670596d5ef05d4a16400a"
- integrity sha512-nBJMIdTX+LYYVGWiF3tdhQ5/tPaYIW80rz8DBzxfLaZYw9pJPolXZ8Vj7xlJWRHbqiM+HghvJPPvgcBXIfKzPw==
+"@gitlab/ui@^9.20.0":
+ version "9.20.0"
+ resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-9.20.0.tgz#69d8d345408a727cfe7ebde3554c78c58f9065b2"
+ integrity sha512-ZWMpvK2Zd2xwQ9svvjzSSD3jI3NnE5izc/bR6kbzXoAe+KdUzLeHDih1ePwhU87BCJeS8JrhJhXT8xnYv/dICg==
dependencies:
"@babel/standalone" "^7.0.0"
"@gitlab/vue-toasted" "^1.3.0"