Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
15e47a89
Commit
15e47a89
authored
Nov 23, 2021
by
lauraMon
Committed by
mgandres
Dec 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds feature flagged details_path to Ci::Status::Bridge::Common
parent
01dd30cc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
5 deletions
+28
-5
app/controllers/projects/jobs_controller.rb
app/controllers/projects/jobs_controller.rb
+2
-2
app/views/projects/jobs/show.html.haml
app/views/projects/jobs/show.html.haml
+4
-1
config/feature_flags/development/ci_retry_downstream_pipeline.yml
...eature_flags/development/ci_retry_downstream_pipeline.yml
+8
-0
lib/gitlab/ci/status/bridge/common.rb
lib/gitlab/ci/status/bridge/common.rb
+5
-1
spec/lib/gitlab/ci/status/bridge/common_spec.rb
spec/lib/gitlab/ci/status/bridge/common_spec.rb
+9
-1
No files found.
app/controllers/projects/jobs_controller.rb
View file @
15e47a89
...
...
@@ -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!
,
...
...
app/views/projects/jobs/show.html.haml
View file @
15e47a89
...
...
@@ -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
config/feature_flags/development/ci_retry_downstream_pipeline.yml
0 → 100644
View file @
15e47a89
---
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
lib/gitlab/ci/status/bridge/common.rb
View file @
15e47a89
...
...
@@ -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?
...
...
spec/lib/gitlab/ci/status/bridge/common_spec.rb
View file @
15e47a89
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment