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
0852bacf
Commit
0852bacf
authored
Jun 10, 2021
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Retry pipelines in the background
Changelog: changed
parent
782924b0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
30 deletions
+1
-30
app/controllers/projects/pipelines_controller.rb
app/controllers/projects/pipelines_controller.rb
+1
-5
config/feature_flags/development/background_pipeline_retry_endpoint.yml
..._flags/development/background_pipeline_retry_endpoint.yml
+0
-8
lib/gitlab/ci/features.rb
lib/gitlab/ci/features.rb
+0
-4
spec/controllers/projects/pipelines_controller_spec.rb
spec/controllers/projects/pipelines_controller_spec.rb
+0
-13
No files found.
app/controllers/projects/pipelines_controller.rb
View file @
0852bacf
...
@@ -176,11 +176,7 @@ class Projects::PipelinesController < Projects::ApplicationController
...
@@ -176,11 +176,7 @@ class Projects::PipelinesController < Projects::ApplicationController
end
end
def
retry
def
retry
if
Gitlab
::
Ci
::
Features
.
background_pipeline_retry_endpoint?
(
@project
)
::
Ci
::
RetryPipelineWorker
.
perform_async
(
pipeline
.
id
,
current_user
.
id
)
# rubocop:disable CodeReuse/Worker
::
Ci
::
RetryPipelineWorker
.
perform_async
(
pipeline
.
id
,
current_user
.
id
)
# rubocop:disable CodeReuse/Worker
else
pipeline
.
retry_failed
(
current_user
)
end
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
do
format
.
html
do
...
...
config/feature_flags/development/background_pipeline_retry_endpoint.yml
deleted
100644 → 0
View file @
782924b0
---
name
:
background_pipeline_retry_endpoint
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61270
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/330915
milestone
:
'
13.12'
type
:
development
group
:
group::pipeline authoring
default_enabled
:
false
lib/gitlab/ci/features.rb
View file @
0852bacf
...
@@ -41,10 +41,6 @@ module Gitlab
...
@@ -41,10 +41,6 @@ module Gitlab
def
self
.
gldropdown_tags_enabled?
def
self
.
gldropdown_tags_enabled?
::
Feature
.
enabled?
(
:gldropdown_tags
,
default_enabled: :yaml
)
::
Feature
.
enabled?
(
:gldropdown_tags
,
default_enabled: :yaml
)
end
end
def
self
.
background_pipeline_retry_endpoint?
(
project
)
::
Feature
.
enabled?
(
:background_pipeline_retry_endpoint
,
project
)
end
end
end
end
end
end
end
spec/controllers/projects/pipelines_controller_spec.rb
View file @
0852bacf
...
@@ -878,19 +878,6 @@ RSpec.describe Projects::PipelinesController do
...
@@ -878,19 +878,6 @@ RSpec.describe Projects::PipelinesController do
expect
(
::
Ci
::
RetryPipelineWorker
).
to
have_received
(
:perform_async
).
with
(
pipeline
.
id
,
user
.
id
)
expect
(
::
Ci
::
RetryPipelineWorker
).
to
have_received
(
:perform_async
).
with
(
pipeline
.
id
,
user
.
id
)
end
end
context
'when feature flag is disabled'
do
before
do
stub_feature_flags
(
background_pipeline_retry_endpoint:
false
)
end
it
'retries the pipeline without returning any content'
do
post_retry
expect
(
response
).
to
have_gitlab_http_status
(
:no_content
)
expect
(
build
.
reload
).
to
be_retried
end
end
context
'when builds are disabled'
do
context
'when builds are disabled'
do
let
(
:feature
)
{
ProjectFeature
::
DISABLED
}
let
(
:feature
)
{
ProjectFeature
::
DISABLED
}
...
...
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