Commit 15e47a89 authored by lauraMon's avatar lauraMon Committed by mgandres

Adds feature flagged details_path to Ci::Status::Bridge::Common

parent 01dd30cc
......@@ -4,8 +4,8 @@ class Projects::JobsController < Projects::ApplicationController
include SendFileUpload
include ContinueParams
before_action :find_job_as_build, except: [:index, :play]
before_action :find_job_as_processable, only: [:play]
before_action :find_job_as_build, except: [:index, :play, :show]
before_action :find_job_as_processable, only: [:play, :show]
before_action :authorize_read_build_trace!, only: [:trace, :raw]
before_action :authorize_read_build!
before_action :authorize_update_build!,
......
......@@ -7,4 +7,7 @@
= render_if_exists "shared/shared_runners_minutes_limit_flash_message"
#js-job-vue-app{ data: jobs_data }
- if @build.is_a? ::Ci::Build
#js-job-vue-app{ data: jobs_data }
- else
.empty-row
---
name: ci_retry_downstream_pipeline
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/
milestone: '14.16'
type: development
group: group::pipeline authoring
default_enabled: false
......@@ -16,7 +16,11 @@ module Gitlab
def details_path
return unless can?(user, :read_pipeline, downstream_pipeline)
project_pipeline_path(downstream_project, downstream_pipeline)
if Feature.enabled?(:ci_retry_downstream_pipeline, default_enabled: :yaml)
project_job_path(subject.project, subject)
else
project_pipeline_path(downstream_project, downstream_pipeline)
end
end
def has_action?
......
......@@ -29,7 +29,15 @@ RSpec.describe Gitlab::Ci::Status::Bridge::Common do
end
it { expect(subject).to have_details }
it { expect(subject.details_path).to include "pipelines/#{downstream_pipeline.id}" }
it { expect(subject.details_path).to include "jobs/#{bridge.id}" }
context 'with ci_retry_downstream_pipeline ff disabled' do
before do
stub_feature_flags(ci_retry_downstream_pipeline: false)
end
it { expect(subject.details_path).to include "pipelines/#{downstream_pipeline.id}" }
end
end
context 'when user does not have access to read downstream pipeline' do
......
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